You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
713 B
38 lines
713 B
SetBatchLines -1 ; Ensures maximum effectiveness of this method.
|
|
CoordMode, Mouse, Screen
|
|
fname := A_ScriptDir . "\on"
|
|
SendMode Input
|
|
cont := true
|
|
val = %1%
|
|
d := Round(1000 / val)
|
|
If (!FileExist(fname)) {
|
|
FileAppend,,%fname%
|
|
}
|
|
SendEvent {Tab}
|
|
TimePeriod = 1
|
|
SleepDuration = 1
|
|
Sleep 1000
|
|
DllCall("Winmm\timeBeginPeriod", UInt, TimePeriod)
|
|
while cont
|
|
{
|
|
GetKeyState, finished,Space,P
|
|
if finished = D
|
|
{
|
|
cont := false
|
|
ExitApp 0
|
|
}
|
|
else
|
|
{
|
|
DllCall("Sleep", UInt, d)
|
|
Click
|
|
}
|
|
}
|
|
DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
|
|
Tab::
|
|
If (FileExist(fname)) {
|
|
FileDelete,%fname%
|
|
}
|
|
else {
|
|
FileAppend,,%fname%
|
|
}
|
|
Pause,Toggle,1
|