Jump to content

Newbie Help with mouseclick


Recommended Posts

Hi,

This is my first time using this program to install a software and I'm in need of some help. I did some googling and followed this tutorial but cannot get the mouse click to work. Below is what I have so far.

#RequireAdmin
Run(@ScriptDir & '\VisionRMS 4.22.0 Client Install.exe')
AutoItSetOption('MouseCoordMode', 0)

WinWait('VisionRMS 4X - InstallShield Wizard')
WinActivate('VisionRMS 4X - InstallShield Wizard')
MouseClick('primary', 355, 362, 1, 0)

The program launches but the click never happens to go to the next screen. This is the tutorial I followed. My exe was made with Installshield. I'm not sure if that makes a difference. Thanks in advance.

 

Link to comment
Share on other sites

  • Moderators

Hi, @gnaypp welcome to the forum. If your application is an InstallShield installation it should support silent install parameters, which will make this much more easy. Check the documentation on the product for silent install instructions, or try running <path to setup.exe> /? to see what parameters are installed. Once you have this, come on back and post what you found and we will help you write your script.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

JLogan3o13,

Thanks for your quick reply. The issue is there's some servername entries that I need to type in on the next screen, a dropdown box that I need to select from, and a checkbox I need to select. I was hoping to use autoit to do these 3 things but can't get past the first screen. Any idea's why the Mouseclick is not working?

Link to comment
Share on other sites

  • Moderators

All of which you should be able to set with parameters on a silent install. But if you are resigned to the manual path, try using the AutoIt Window Info Tool, found in the same directory where you installed AutoIt. Hover the cross-hairs over the element you want to select, in this case I am guessing a button, at see what it returns. Post the information here and we can go from there.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

JLogan3o13, 

I think I just figured it out. I needed to put in the sleep command while the exe extracts the file. After doing this it is now working. Thanks for the help. It's good to know there are folks willing to be patient and help out newbies like me. Thanks again.

 

#RequireAdmin
Run(@ScriptDir & '\VisionRMS 4.22.0 Client Install.exe')
AutoItSetOption('MouseCoordMode', 0)
Sleep(10000)
WinWait('VisionRMS 4X - InstallShield Wizard')
WinActivate('VisionRMS 4X - InstallShield Wizard')
MouseClick('primary', 355, 362, 10, 0)

Link to comment
Share on other sites

  • Moderators

Try the controlclick function, which is a lot more stable than MouseClick (ControlClick works whether the window is in focus or not). Try something like this:

ControlClick("VisionRMS 4X - InstallShield Wizard", "", "Button1")

Or

ControlClick("[CLASS: MsiDialogCloseClass]", "", "Button1")

Although, as a final beating of the dead horse, the fact that it is an MsiDialogCloseClass tells you this is a wrapped MSI, which means you should be able to install it silently, and specify all of your parameters such as servername, checkboxes, etc.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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...