Jump to content

IE PHP pauses Script


Recommended Posts


My AutoIt script clicks on a button in IE and a PHP script is started. This PHP script puts an alert window on screen with an OK button. I can't have my AutoIt script click on that button because the PHP script fully took over my AutoIt script and pauses my AutoIt script until I manually press on the Ok button.

I don't want the PHP script pauses my AutoIt script, how can I accomplish that?


Link to comment
Share on other sites

I wouldn't think that the PHP is taking over your script. Without seeing anything, my guess is that maybe it's a winwaitactive that is pausing the script and since that popup is keeping the needed window from being active, the script is paused until the popup goes away.

sound about right?



My Android cat and mouse game

We're gonna need another Timmy!

Link to comment
Share on other sites

Is sounds right; The script indeed is paused until the popup goes away. Because it's paused I can't get control over the alert window/popup.

I found the solution in the help file ..

#include <IE.au3>

$oIE = _IE_Example ("form")

$oSubmit = _IEGetObjByName ($oIE, "submitExample")

$hwnd = _IEPropertyGet($oIE, "hwnd")

_IEAction ($oSubmit, "focus")

ControlSend($hwnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}")

; Wait for Alert window, then click on OK

WinWait("Windows Internet Explorer", "ExampleFormSubmitted")

ControlClick("Windows Internet Explorer", "ExampleFormSubmitted", "[CLASS:Button; TEXT:OK; Instance:1;]")

_IELoadWait ($oIE)

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

  • Recently Browsing   0 members

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