Code:
#SingleInstance force
#NoEnv
SetWorkingDir %A_ScriptDir%
values:=["space","a","d"]
SetTimer, Idle, 300000 ; <-------- Set idle time (1000 = 1 sec)
return
Idle:
random, rand2, 300000, 600000
While (A_TimeIdle > rand2) ; 5 to 10 min wait time.
{
; loop start here
random, rand, 1, 3
Random, rsleep, 28, 50
SetTitleMatchMode, 2
WinActivate, Warcraft ;<- activate the game window
Stopped = 0 ; turn off the stopped flag
SendInput, % "{" values[rand] " down}"
Sleep %rsleep%
SendInput, % "{" values[rand] " up}"
Sleep %rsleep%
; loop end here
}
return
End:: ; press End key to forcefully suspend scipt
Suspend, Toggle
Pause, Toggle, 1
return
This will at random times between 5 and 10 min maximize the wow client if no input is detected then pick a random key that's either "space bar", "a" or "d" then press the key for a split second, then it waits 28ms to 50ms and depresses the key, then waits again 28ms to 50ms, then the script loops again in 5 to 10 min if no activity is detected. Everything Is random pretty much, just felt like making something! merry Christmas!
*edit*
So I played with the above for a few hours and turned it into this
Code:
#SingleInstance force
#NoEnv
SetWorkingDir %A_ScriptDir%
values:=["a","d"]
SetTimer, Idle, 15000 ; <-------- Set idle time (1000 = 1 sec)
SetTimer, Dclick, 15000
return
Idle:
random, rand2, 15000, 50000
While (A_TimeIdle > rand2) ; 1 to 2 min
{
; loop start here
random, rand, 1, 2
Random, rsleep, 28, 50
SetTitleMatchMode, 2
WinActivate, Warcraft ;<- activate the game window
Stopped = 0 ; turn off the stopped flag
SendInput, % "{" values[rand] " down}"
Sleep %rsleep%
SendInput, % "{" values[rand] " up}"
Sleep %rsleep%
; loop end here
}
return
Dclick:
random, rand4, 15000, 50000
While (A_timeIdle > rand4)
{
;
Random, xsleep, 100, 400
Random, Queclick, 5000, 10000
MouseClick, Left, 252, 665, 1, 0.1
Sleep %Queclick%
MouseClick, right, 1758, 200, 1, 0.1
Sleep %xsleep%
MouseClick, Left, 1807, 271, 1, 0.1
Sleep %xsleep%
MouseClick, Left, 975, 752, 1, 0.1
;
}
return
End:: ; press End key to forcefully suspend scipt
Suspend, Toggle
Pause, Toggle, 1
return
Okay, So this seems to break if you change either of the SetTimer's from something the other is not, I am still playing with it but this works. It turns your character using "a" or "d" every 50 sec to 2min (this is because it's trying to play both scripts I think? It should be set to 15 secs to 50 secs).
The script then sends your mouse around the screen to que you into battlegrounds and such! So how it works is when you go to the Alterac mountains to que up for AV, you walk into the Instance portal and the battleque appears. You then just run the script and It will take anywhere from 50 secs to 2 min but It will click join battle, then 5 to 10 secs latter (because instant que pops For The Alliance!!) It will click the mini map and then click enter battle, right after that it will click where the scoreboard leave battleground button will be eventually after the bg is over. When you exit the bg If you qued in Alterac mountains the battleque will automatically pop up, then the script over. You may need to adjust the cords I set as default, Im using a 1920x1080p screen that's 17 inches right now. If this is the case just edit my script with the correct cords. To find cords just make another script and put this in it
Code:
CoordMode, Mouse, Screen
Loop
{
MouseGetPos, x, y
ToolTip, % x "," y
Sleep 50
}
In theory, you could que av all night while you slept with this script running :thinking:
I am probably going to try to make this work better tomorrow but it's late so Im done for now! enjoy!