KBcool 1 Posted October 17, 2010 Hello, I have been working with AutoIt for a bit now (though I am the definition of "Beginner") and I have an issue with a script I am making. I have attempted to make a script that will run an aplication automatically. The application in question is a registry cleaner from Auslogics. Here is the script as such: opt("SendKeyDelay", 300) WinWaitActive("Auslogics Registry Cleaner") ControlSend("Auslogics Registry Cleaner", "Scan Now", "TAxCheckboxTreeView201", "{DOWN 14}{SPACE}") ControlSend("Auslogics Registry Cleaner","Scan Now","TAxDropDownButton201","{DOWN 3}{ENTER}") WinWait("Auslogics Registry Cleaner","< Back") ControlSend("Auslogics Registry Cleaner","< Back","TButton1","&{SPACE}") WinWait("Auslogics Registry Cleaner","Repair",200) $Repair = ControlSend("Auslogics Registry Cleaner","Repair","TButton1","&{SPACE}") If $Repair == 1 Then Opt("SendKeyDelay", 10000) Send("!{F4}") Else Opt("SendKeyDelay", 5) Send("!{F4}") EndIf The script was working fine until I got to the section where I create the $Repair variable. What I'm attempting is to make the script pause for 10 seconds if it successfully sends a keypress to the repair Control, to give the program enough time to complete. However if it does not exist it will exit immediately. As it stands it will exit immediatly even if it does find a button labeled "Repair". Any help would be greatly appreciated. Share this post Link to post Share on other sites
MrPPP 0 Posted October 17, 2010 Why you do not just use "Sleep ( 10000 ) " to pause the script for 10 seconds? Share this post Link to post Share on other sites
KBcool 1 Posted October 17, 2010 Actually I have done that now, but unfortunately it still closes prematurely even when there is a repair to be made. Share this post Link to post Share on other sites
Bert 1,430 Posted October 17, 2010 Does the application support command line switches? If yes, then automating the program is real easy. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Share this post Link to post Share on other sites