Sign in to follow this  
Followers 0
Max in montreal

mouseclick location

4 posts in this topic

when i want to do a left mouse click, if i enter the X,Y...that is relative to the screen, i want to make it relative to the window. So where ever the window is located, the mouse will click at loacation, 30, 30 for that window.

How would i do this?

thanks in advance.

Share this post


Link to post
Share on other sites



see help file for "Opt" (or AutoItSetOption) and "MouseCoordMode"

ok so i put

AutoItSetOption ( "MouseCoordMode" [, 0] )

where?

this is what i have so far...

Run ("C:\Program Files\max\max.exe")

WinWaitActive("Login")

send("{enter}")

WinWaitActive("max anounces")

send("{enter}")

WinActivate ( "max stuff - Logged In As" [, ""] )

MouseClick ("left" [100,180])

MouseClick ("left" [225,200])

MouseClick ("left" [100,250])

it all works well untill i get to the specific mouse clicks...

Share this post


Link to post
Share on other sites

I wouldn't recommend putting that line anywhere in your code as it would produce an error,

on top of the other errors in your script. Those brackets shown in the helpfile are just there

to show that those parameters are optional, and shouldn't be used in actual code like that.

So remove those brackets from your WinActivate, MouseClick's and MouseCoordMode, and

then put your MouseCoordMode on the top of your script.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Opt("MouseCoordMode", 0)
Run ("C:\Program Files\max\max.exe")
WinWaitActive("Login")
send("{enter}")
WinWaitActive("max anounces")
send("{enter}")
WinActivate ( "max stuff - Logged In As" , "" )
MouseClick ("left" ,100,180)
MouseClick ("left" ,225,200)
MouseClick ("left" ,100,250)

Don't use brackets... That just lets you know that parameter is optionial.

Edited by CHRIS95219

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