Jump to content

letting script wait for browser to finish


Recommended Posts

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

Link to comment
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
Edited by Radsam
Link to comment
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
Link to comment
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
Link to comment
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

Link to comment
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 :)
Link to comment
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
 Share

  • Recently Browsing   0 members

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