Sign in to follow this  
Followers 0
Berend Jan

letting script wait for browser to finish

8 posts in this topic

hi again,

sorry for spamming but i'm really a n00b at this still.

But my question is how do I pause the script to wait for a internet page to have loaded completely and then continuing?

BJ

Share this post


Link to post
Share on other sites



hi again,

sorry for spamming but i'm really a n00b at this still.

But my question is how do I pause the script to wait for a internet page to have loaded completely and then continuing?

BJ

<{POST_SNAPBACK}>

If the page changes the title of the Internet Explorer title bar, you can check for that.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

This something like this:

Make sure to use opt:

AutoItSetOption("WinTitleMatchMode", 2)

Func _WaitForWebPage()
    Do
        $sIEstatus = StatusbarGetText("Internet Explorer")
    Until $sIEstatus = "Done"
EndFunc
Edited by Radsam

Share this post


Link to post
Share on other sites

no it doesnt change the window title sadly enough.

Isnt there a way to "scan" the progress bar?

Share this post


Link to post
Share on other sites

This something like this:

Make sure to use opt:

AutoItSetOption("WinTitleMatchMode", 2)

Func _WaitForWebPage()
    Do
        $sIEstatus = StatusbarGetText("Internet Explorer")
    Until $sIEstatus = "Done"
EndFunc

<{POST_SNAPBACK}>

I'll test it. Though i'm using Mozilla Firefox, should this be a problem if i change it to:

Func _WaitForWebPage()
    Do
        $sMOZstatus = StatusbarGetText("Firefox")
    Until $sMOZstatus = "Done"
EndFunc

Share this post


Link to post
Share on other sites

If it is a problem, try using the AutoIT Window Info tool to determine what the control is called. Then use something like this:

Func _WaitForWebPage()
    Do
        $sBrowserstatus = ControlGetText("FireFox", "", "FireFox Status Control Name")
    Until $sBrowserstatus = "Done"
EndFunc

Share this post


Link to post
Share on other sites

If it is a problem, try using the AutoIT Window Info tool to determine what the control is called. Then use something like this:

Func _WaitForWebPage()
    Do
        $sBrowserstatus = ControlGetText("FireFox", "", "FireFox Status Control Name")
    Until $sBrowserstatus = "Done"
EndFunc

<{POST_SNAPBACK}>

Good luck, Mozilla Firefox doesn't give up the status bar text easily (if at all), nor is it listed as a "control" per say with the window spy.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Good luck, Mozilla Firefox doesn't give up the status bar text easily (if at all), nor is it listed as a "control" per say with the window spy.

<{POST_SNAPBACK}>

no it doesnt at all :D think i have to give it up then. thanks for the effort :)

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