Jump to content

Recommended Posts

Posted

Open url in default browser and wait till page loaded. I have been to this site many times but yet to see this answered, so have joined to expand the question.

My default browser is MS Edge. Certainly not my favourite browser, but it is a club computer. The web page I am opening is Bridgewebs which blocks Internet explorer.

Using Autoit script I open the page and ping to confirm it has opened before proceeding with my script. This has proved unreliable with the script proceeding before the page is able to respond to the script.

ShellExecute("https://www.bridgewebs.com/cgi-bin/bwor/bw.cgi?pid=upload_menu&wd=1&club=motueka")

Func _local2()
    Local $PID = ping("https://www.bridgewebs.com/cgi-bin/bwor/bw.cgi?pid=upload_menu&wd=1&club=motueka")
    If $PID = 0 Then
        Do
            Sleep(10)
        Until ping("https://www.bridgewebs.com/cgi-bin/bwor/bw.cgi?pid=upload_menu&wd=1&club=motueka") <> 0
        ; If yes then end loop
    Else
    EndIf
 EndFunc
 

Any alternative wait scripts or should this method work?

Thanks

Posted

Thank you for your response. Bridgewebs allows independent posting of a session results which requires a login. I could simply put a long sleep in the script but this has caused dangerous uncontrollable variance of the script when the webpage has taken longer to open than expected. And with uploading results at the end of the night, one wants it done in minimal time.

Posted
14 minutes ago, Hayseed said:

I could simply put a long sleep in the script but this has caused dangerous uncontrollable variance of the script when the webpage has taken longer to open than expected.

hmm, maybe Send a Ctrl+A ( to select all text ), then Ctrl+C ( to copy the selected text ) and if "allow for www.bridgewebs.com. If you do not" is in the text, it could be said that the page loaded. Otherwise you'd have to learn how to work with a webdriver.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

Yes, I just looked at webdriver, new to me and not keen, at least this week. You have given me confirmation 'ping' is not working and another option to explore. Many thanks for that. I will post further as time allows.

  • Moderators
Posted

Moved to the appropriate forum.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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