Hey folks, what I'm trying to accomplish is simply:
I want to get AHK to send keypresses to wow upon detecting movement of my mouse. (Basically to prospect and mill)
Code:
#persistent
coordmode, mouse, screen
mousegetpos, sx, sy
settimer, check, 1000
return
check:
mousegetpos, cx, cy
if (cx != sx or cy != sy)
{
; mouse has moved, calculate by how much
if (cx > (sx+2) or cx < (sx-2) or cy > (sy+2) or cy < (sy-2))
{
ControlSend,,=,World of Warcraft
mousegetpos, sx, sy ; get new mouse position
}
}
return
That script there effectively covers what I want it to do, but I need a few modifications.
1) I need a way to distinguish between my 2 World of Warcraft clients and only send the keypress to one of the client. This is not absolutely a must have but it would be nice.
2) I want to make the keypresses that it sends more random. Prospecting/milling takes about 2 seconds to cast, so it would be great if there was a way to randomize the time in which it sends those keypresses within that 2 second window. I'm using it for a legitimate use where it only sends the keypress upon mouse movement, but I simply don't want to deal with the inconvenience of Blizzard banned me thinking I was botting.
My +7 rep to anyone that can help me out