IE com automation and OK/Cancel dialogboxes

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sankt_Ola
Posts: 11
Joined: 25 Sep 2017, 05:49

IE com automation and OK/Cancel dialogboxes

20 Nov 2017, 04:33

In a fairly simple webpage I automatically enter data in TextBoxes and then
when I submit the page by

Code: Select all

; Save
IE.document.getElementsByTagName("button")[0].click()
IE popups OK/Cancel dialogboxes asking questions like "Is the date 2017-11-20 correct?"
This I think is horrible from a userinteface perspective. Allt the more so when there
are several such popups. The number of popups is not determined
sometimes it's one, sometimes it's two, sometimes it's three

I usually wait for an IE page to finish with

Code: Select all

; Wait for IE to be in a responding state
while IE.busy or IE.ReadyState != 4
   Sleep 10

*EDIT*
The checks and spawning of popups is made in Javascript.

How can I incorporate detecting and clicking OK in a popup OK/Cancel Dialogbox
User avatar
Xeo786
Posts: 760
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: IE com automation and OK/Cancel dialogboxes

20 Nov 2017, 07:38

dialog box appearing from web page thought COM might held whole script on wait until dialog box task is performed,
You can use there settimer with, IfWinActive and controlsend or controlclick .
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], mikeyww, Oblomov228, PsysimSV, uchihito and 192 guests