Jump to content

Help Closing a Box during an Uninstallation


Recommended Posts

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.

post-35660-1210951789_thumb.jpg

Link to comment
Share on other sites

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

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

your WinWait Statement should have parens as well.

WinWait("Haestad Methods Deactivation Wizard")
Edited by Kerros

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Link to comment
Share on other sites

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 by monoceres

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

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