MouseMove

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
GA-Fantonos
Posts: 4
Joined: 17 Sep 2018, 22:57

MouseMove

20 Sep 2018, 00:25

Code: Select all

Hey im a noobie to ahk i was wondering if there is anyway to make a script that: "if the mouse position is the same as 10 secs ago send r" any help would be appreciated :D 
Rohwedder
Posts: 7625
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: MouseMove

20 Sep 2018, 04:09

Hallo,
try:

Code: Select all

#Persistent
MouseGetPos, Xold, Yold
MoveTime := A_TickCount + 10000
SetTimer, Mouse, 100
Return
Mouse:
MouseGetPos, X, Y
If (X <> Xold Or Y <> Yold)
{
	MoveTime := A_TickCount + 10000
	Xold := X, Yold := Y
}
If (MoveTime < A_TickCount)
{
	SendInput, r
	MoveTime := A_TickCount + 10000
}
Return
GA-Fantonos
Posts: 4
Joined: 17 Sep 2018, 22:57

Re: MouseMove

20 Sep 2018, 06:07

Omg you are the best thank you!! now if pixel search actually worked for me :( , oh well you win some you lose some

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Lamron750, septrinus and 253 guests