Jump to content

Recommended Posts

Guest Guest
Posted

I have a question regarding WinWait.

WinWait "title" "text"

So if i have a Setup window, that says Welcome to setup wizard i type:

WinWait "Setup", "Welcome to setup wizard"

But, if i got a Internet explorer window, and want to wait until the page is loaded, what do i type then?

I know what it will say on the loaded page, but when using Spy, it can´t see any text?

So in short, how do i wait for a webpage to load until continue script?

Guest Guest
Posted

Why is this not working?

Run ("C:\Program Files\Internet Explorer\iexplore")

Global $SD = @ScriptDir & "\"

Opt("WinTitleMatchMode", 2)

Opt("WinDetectHiddenText", 1)

$x = StatusbarGetText("Utopia")

IniWrite($SD & "test.ini", "Options", "test", $x)

My "Home Page" is Utopia, it just send a empty value to my ini file.

[Options]

test=

Posted (edited)

  Guest said:

But, if i got a Internet explorer window, and want to wait until the page is loaded, what do i type then?

check out StatusbarGetText

in my IE, when a page is loaded, it says Done in Part 1...

winwait("window title", StatusbarGetText ( "title" [, "text" [, part]] ) ="Done")
would probably do it...

  Autspy said:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

(1): Done

(2):

(3):

(4):

(5):

(6): Internet

Edited by emmanuel

"I'm not even supposed to be here today!" -Dante (Hicks)

Guest Doxie
Posted

Another question, what is the command to open a URL :D

Posted (edited)

@Doxie:

Run(@ComSpec & ' /c start "http://foo/bar"')

or in WinNT4+:

Run(@ComSpec & ' /c start "" "http://foo/bar"')

(untested but should work)

Edited by sugi
Posted

You can try the following code. Works on my WinXP home edition:

Run ("C:\Program Files\Internet Explorer\iexplore http://www.yahoo.com")
Posted

  midiaxe said:

Run ("C:\Program Files\Internet Explorer\iexplore http://www.yahoo.com")
This will make everybody who doesn't like the internet explorer go crazy since they're unable to change the browser without modifying the script.

You should also use @ComSpec & " /c start iexplore.exe" instead of the full path. Using the full path will fail on every computer where "Program Files" is called different. So only use this if your script really needs the internet explorer.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...