Script for mouse click on screen coordinates Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Nucleorion
Posts: 50
Joined: 11 Dec 2016, 11:33

Script for mouse click on screen coordinates

17 Jul 2018, 03:23

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?
User avatar
jmeneses
Posts: 524
Joined: 28 Oct 2014, 11:09
Location: Catalan Republic

Re: Script for mouse click on screen coordinates

17 Jul 2018, 03:38

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%
Donec Perficiam
Nucleorion
Posts: 50
Joined: 11 Dec 2016, 11:33

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

17 Jul 2018, 13:24

Work fine. Thank you :)
I was simple more, think

Code: Select all

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

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Joey5, RandomBoy and 372 guests