Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 02-21-2019, 08:22 AM
Nico Nico is offline
Registered User
Join Date: Feb 2019
Posts: 12
Open Url in foreground


I want to displayed the web page in foregroud

the code:

#$language = "VBScript"
#$interface = "1.0"
' Get a reference to IE's Application object
Set g_objIE = CreateObject("InternetExplorer.Application")
'g_objIE.Offline = True
g_objIE.Offline = False
g_objIE.navigate "http://lochalost/demo/public/ref"
' This loop is required to allow the IE object to finish loading...
crt.Sleep 100
Loop While g_objIE.Busy

' Prevent the MenuBar, StatusBar, AddressBar, and Toolbar from
' being displayed as part of the IE window
g_objIE.MenuBar = False
g_objIE.StatusBar = False
g_objIE.AddressBar = False
g_objIE.Toolbar = False
' Set the initial size of the IE window
g_objIE.height = 400
g_objIE.width = 425
' Set the title of the IE window
g_objIE.document.Title = "SFK"

g_objIE.Visible = True
' This loop is required to allow the IE window to fully display
' before moving on
crt.Sleep 100
Loop While g_objIE.Busy

' This code brings the IE window to the foreground (otherwise, the window
' would appear, but it would likely be behind the SecureCRT window, not
' easily visible to the user).
Set objShell = CreateObject("WScript.Shell") 
objShell.AppActivate g_objIE.document.Title
' Once the dialog is displayed and has been brought to the
' foreground, set focus on the control of our choice...

g_objIE.Document.All("ref").Value= "uguigio"
crt.Screen.SendKeys "{ENTER}"
' Wait for user interaction with the dialog...
crt.Sleep 200

The web page does not appear in the foreground with this code

Thank you for your help

Last edited by ekoranyi; 02-21-2019 at 08:29 AM.
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 02:47 PM.