Jump to content

MouseMove doesnt always work


jezzer
 Share

Recommended Posts

Hi All,

Dipping my toe here into AutoIt water and finding it a little frustrating getting even simple things to work as expected.

I've been trying to ControlClick on the Finish button of an InstallShield dialog and I cannot get it to work. So trying to work around this by moving the mouse over the button myself, Ive walked into this oddity.

Code looks like:-

if WinWaitActive("InstallShield Wizard", "InstallShield Wizard Complete", 5) <> 0 then
   Msgbox(0, "AutoInstaller", "Finished")
Else
   Msgbox(0, "AutoInstaller", "TimedOut")
Endif
MouseMove (100, 100)

If the WinWaitActive call times out, the MouseMove works fine BUT does nothing if the other half of the branch is run.

There is also a Finish button on the dialog. I have tried in vain

ControlClick("", "", "[Text:Finish]")

aswell as various other combinations, and cannot dismiss the dialog. Sob!

Any ideas ?

Jez

Link to comment
Share on other sites

MouseMove does nothing more than move the mouse, it is not supposed to do anything else

so I assume that is working fine.

In controlclick you will need to provide the window name as you did with WinwaitActive, or handle to that window

assuming the "[Text:Finished]" ID is correct that is.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

No, the mouse doesnt move at all when the window becomes active (in my test its always there, I just dont click on it to make it active).

If I let it time out, mouse moves quite happily to 100, 100

I have tried this too but it doesnt work either.

ControlClick("InstallShield Wizard", "InstallShield Wizard Complete", "[Text:Finish]")

I wrote my own test dialog and it is dismissed Ok. I'm convinced its something specific to InstallShield dialogs and wonder whether the two issues are connected in some way.

Edited by jezzer
Link to comment
Share on other sites

  • Moderators

Hi, Jezzer. Not to post too much off topic, but since this is an Installshield installation that means it is an MSI. Even if it is a Setup.exe, the MSI is embedded inside. I would highly suggest you do some googling on extracting the MSI from an Installshield executable (normally it saves this file to your temp directory), and then run the MSI. Not only do you have many more options to run it silently, it will also run much more quickly. :)

"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

It would seem then that That particular app installation does not want to be automated.

Try using the ControlClick Advanced class

ControlClick("InstallShield Wizard", "", "[advanced class here]")

Although if it is indeed resisting automation then it's likely Controlclick will be

blocked also.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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