Sign in to follow this  
Followers 0
hylika

specific exe won't let me script

6 posts in this topic

Hi

I am new to Autoit, try to find out but may have missed the thing so please excuse if this is a common issue.

I have very simple script where I wish to click a control on a specific app called Player

WinActivate("Player")

ControlGetFocus("Player")

ControlClick("Player", "" , 4037)

4037 being the control ID I wish to click on.

This was not working so to try additionnal things, I add

MouseMove(715,499,100)

MouseClick("primary", 715, 499, 2)

the app "Player" is activated by the script but then the MouseMove don't even work

If I replace "Player" by an other app like Firefox I can see the Mouse moving, but not with this particular "Player" app, the mouse won't move.

Any idea??

Thanks for your help

Share this post


Link to post
Share on other sites



Since your Player window is active, try using $var = WinGetTitle("[active]") to get the active window name and then passing $var to your ControlClick(). It may be that the title isn't what it seems. I once had a window title with a space at the end that caused me trouble.

Also try Opt("WinTitleMatchMode", 2) to match any text within the title.

Share this post


Link to post
Share on other sites

The script is activating the window so the title is right.

The speed of youe mouse "100" will take a week to move, try leaving that param out or change to 10

Your control click ID most likely changed with each time the app starts, try using its class.


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

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Is the Player process running as admin? If it is, your script needs to run as admin as well.

Share this post


Link to post
Share on other sites

Hi thanks for your feedback

It appears that my script was ok but failing with the 64 bits version

I tried the 32 bits and it was working properly with this "Player" application as well!

Share this post


Link to post
Share on other sites

You can compile your script to a 64 bit application which may also be worth doing.

Share this post


Link to post
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
Sign in to follow this  
Followers 0