scooper Posted August 11, 2009 Share Posted August 11, 2009 (edited) Hi all, I have a script that sometimes goes wrong for several reason and so it makes an error window like this AutoIt Error Line 1247 (File"C:\...\inclue.. Error: the requested action with tihis object has failed. OK I tried to attach the image but I didn't manage it now I want to do a script that click on "OK" in that window, this is my code, if WinExists("AutoIt Error","OK") Then ControlClick("Autoit Error","OK","[CLASS:Button; INSTANCE:1]","left",1) EndIf I tried several times to change ID and I can not make it work, is there anyone who can tell me where i'm wrong please? Edited August 11, 2009 by scooper Link to comment Share on other sites More sharing options...
Szhlopp Posted August 11, 2009 Share Posted August 11, 2009 Hi all, I have a script that sometimes goes wrong for several reason and so it makes an error window like this AutoIt Error Line 1247 (File"C:\...\inclue.. Error: the requested action with tihis object has failed. OK I tried to attach the image but I didn't manage it now I want to do a script that click on "OK" in that window, this is my code, if WinExists("AutoIt Error","OK") Then ControlClick("Autoit Error","OK","[CLASS:Button; INSTANCE:1]","left",1) EndIf I tried several times to change ID and I can not make it work, is there anyone who can tell me where i'm wrong please? Try this: if WinExists("AutoIt Error", "") = 1 Then ControlClick("Autoit Error", "", "[CLASS:Button; INSTANCE:1]") A lot of the time, it can't the 'text' part of the box. Less is more >_< RegEx/RegExRep Tester!Nerd Olympics - Community App!Login UDFMemory UDF - "Game.exe+753EC" - CE pointer to AU3Password Manager W/ SourceDataFiler - Include files in your au3!--- Was I helpful? Click the little green '+' Link to comment Share on other sites More sharing options...
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