Which command to use to anticipate a command line, for example, every 8 seconds the mouse moves to a position x, y, however, I would like the F2 key to anticipate the mouse moves from the next line manually without having to wait the 8 seconds , a shortcut to anticipate the next line, what would the command be?
F1::
mousemove 899, 600
sleep, 8000
mousemove 634, 232
sleep, 8000
mousemove 233, 1980....
[Mod action: Topic moved from "Scripts and Functions"]
shortcut key to anticipate the next line of a script ?
-
- Posts: 6
- Joined: 22 Nov 2021, 21:50
Re: shortcut key to anticipate the next line of a script ?
An idea, maybe it does what you want. I adapted the MouseMove coordinates for testing purposes, also introduced a Tooltip for the same reason, you can remove it later.
Code: Select all
arr := [ [100, 200], [300, 400], [500, 600], [100, 200], [300, 400], [500, 600] ]
F1::
For _, v in arr {
MouseMove, v[1], v[2]
Sleeping(8000)
}
return
Sleeping(n) {
Loop, 100 {
if !GetKeyState("F2", "P") {
ToolTip, % A_Index
Sleep, % n//100
} else return
}
}