Page 1 of 1

Script for mouse click on screen coordinates

Posted: 17 Jul 2018, 03:23
by Nucleorion
I like to left click a coordinates on screen when I push key Home.
I tried:

Code: Select all

Home::
Sleep,5000
;MouseClick, left, 1813, 1049
;Click, Screen, 1813, 1049
CoordMode, Click, Screen
x := 1813
y := 1049
Click
But not work. They work to window coordinates with Click, 1813, 1049. How I set to screen position in click command?

Re: Script for mouse click on screen coordinates

Posted: 17 Jul 2018, 03:38
by jmeneses
Hello Nucleorion
The parameter "Click" in CoordMode doesn't exists
Try this

Code: Select all


Home::
Sleep,5000
;MouseClick, left, 1813, 1049
;Click, Screen, 1813, 1049
CoordMode, Mouse, Screen
x := 1813
y := 1049
Click %x% %Y%

Re: Script for mouse click on screen coordinates  Topic is solved

Posted: 17 Jul 2018, 13:24
by Nucleorion
Work fine. Thank you :)
I was simple more, think

Code: Select all

Home::
Sleep,5000
CoordMode, Mouse, Screen
Click, 1813, 1049
return