Basically I want to know if I can randomize which MouseClickDrag command gets selected, to make this appear more human like? Below is the script, and the part I am wondering if I can I put a command in to somehow choose a random area within these parameters, or commands below?
MouseClickDrag, Left, 600, 200, 1350, 850, 30,
MouseClickDrag, Left, 800, 193, 1347, 657, 23,
MouseClickDrag, Left, 867, 20, 1301, 709, 15,
MouseClickDrag, Left, 623, 234, 1567, 812, 6,
MouseClickDrag, Left, 409, 109, 1947, 801, 32,
MouseClickDrag, Left, 610, 96, 1747, 677, 11,
Also, can someone give me a command to have this AHK script only work if the program is in the foreground, and pause when it is in the back ground?
Code:
#NoEnv
zoneX := ( A_ScreenWidth / 2 )
zoneY := ( A_ScreenHeight / 2 ) - ( 0.04 * A_ScreenHeight )
SetDefaultMouseSpeed, 0
SetKeyDelay, -1
Numlock::suspend
Insert::
Send {backspace}
{
ControlSend, , {backspace}
Sleep, 50
}
{
SetBatchLines, -1
SetKeyDelay, -1
SetMouseDelay, 1
SetDefaultMouseSpeed, 0
MouseClickDrag, Left, 600, 200, 1350, 850, 30,
sendinput, {q}
}
{
SetBatchLines, -1
SetKeyDelay, -1
ControlSend, , {q}, StarCraft II
Send {Shift down}
Mouseclick, left, %zoneX%, %zoneY%
Send {Shift up}
}
Sleep, 45
SendInput, {[}
return