Jump to content

specific exe won't let me script


hylika
 Share

Recommended Posts

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

Link to comment
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.

Link to comment
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.

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