tjb627 Posted May 16, 2008 Share Posted May 16, 2008 Hey Guys, This is my first AutoIT script and I'm having trouble clicking buttons on a box that pops up. I have a batch script that uninstalls a program for me. However, during that uninstallation, the program requires that I deactivate it. So I'm hoping to use AutoIT to click Next, Next and then Finish. I've attached a screenshot of the window I want to click with the AutoIT window tool open. I tried telling it what to click using the ID # but the # appears to change. Also, I don't know what resolution my end users will be set to so I don't really think I can use coordinates to click with either. I'm not sure what to do. Here is what I'm using: Run("Z:\Network\Programs\Haestad\FlowMaster\uninstall_flowmaster.bat") Sleep(10000) WinWait "Haestad Methods Deactivation Wizard" ControlClick("Haestad Methods Deactivation Wizard", "", "[ID:525446]") Sleep(5000) ControlClick("Haestad Methods Deactivation Wizard", "", "[ID:525446]") Sleep(10000) ControlClick("Haestad Methods Deactivation Wizard", "", "[ID:656490]") Run("z:\Network\Programs\Bentley\FlowMaster\install_flowmaster.bat") Exit My uninstall script works, the deactivation window pops up and then the AutoIt script just keeps on going, nothing in the deactivation window ever changes. It doesn't appear to be clicking anything. Link to comment Share on other sites More sharing options...
Kerros Posted May 16, 2008 Share Posted May 16, 2008 Remove [iD: ] from you code. ControlClick("Haestad Methods Deactivation Wizard", "", "[ID:656490]") should be. ControlClick("Haestad Methods Deactivation Wizard", "", 656490) Kerros Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. Link to comment Share on other sites More sharing options...
tjb627 Posted May 16, 2008 Author Share Posted May 16, 2008 Remove [iD: ] from you code. ControlClick("Haestad Methods Deactivation Wizard", "", "[ID:656490]") should be. ControlClick("Haestad Methods Deactivation Wizard", "", 656490) Kerros I took that out and now get an error. What does this error mean? Line 5 (File "C:\Documents and Settings\tbrown2\Desktop\flowmaster.au3"): WinWait "Haestad Methods Deactivation Wizard" ^ERROR Error: Error parsing function call. Link to comment Share on other sites More sharing options...
Kerros Posted May 16, 2008 Share Posted May 16, 2008 (edited) your WinWait Statement should have parens as well. WinWait("Haestad Methods Deactivation Wizard") Edited May 16, 2008 by Kerros Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. Link to comment Share on other sites More sharing options...
monoceres Posted May 16, 2008 Share Posted May 16, 2008 (edited) your WinWait Statement should have parens as well. WinWait("Haestad Methods Deactivation Wizard")Just wanted to say, congratulations for making the 500,000th post! Edited May 16, 2008 by monoceres Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
tjb627 Posted May 16, 2008 Author Share Posted May 16, 2008 Okay, now I don't get any errors but the ID # for that Next button still seems to change every time I run it. Is there any other way to tell it to click next? Or possibly even just tell that Haestad window to close? 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