Rodger Posted February 19, 2010 Posted February 19, 2010 Hello, 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? Rodger
kaotkbliss Posted February 19, 2010 Posted February 19, 2010 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? 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
Rodger Posted February 19, 2010 Author Posted February 19, 2010 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.
Rodger Posted February 19, 2010 Author Posted February 19, 2010 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)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now