Sign in to follow this  
Followers 0
Guest Guest

WinWait help

9 posts in this topic

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?

Share this post


Link to post
Share on other sites



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=

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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...

>>>>>>>>>>> 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)

Share this post


Link to post
Share on other sites

Thanks, it helped :D

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#6 ·  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

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
Share on other sites

Thanks, ill try both. :D


Were ever i lay my script is my home...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0