would appreciate some help if anybody can chime in
trying to create a script where if I hold down the right mouse button for a set amount of time, it triggers a loop. and if the mouse button is released, the incremented value goes back to 0 so timer starts over again. Can't get the second loop to work at all, I'm sure it's a problem with the structure of the code, this is what I have so far, I'm missing the entire section for resetting the timer, that one I'm not even sure where to include yet.
timer := 0
loop
while GetKeyState("RButton")
{
timer += 1
sleep 100
}
return
loop
while timer > 3
{
run this loop when timer increments to 3 (300ms later)
}
return
Initiating a loop from a different loop?
Re: Initiating a loop from a different loop?
Hallo,
try:
try:
Code: Select all
timer := 0
Loop
{
Sleep, 100
If GetKeyState("RButton")
{
timer += 1
}
}
Until Timer = 3
loop
{
;run this loop when timer increments to 3 (300ms later)
ToolTip, % A_TickCount
}
return
Who is online
Users browsing this forum: No registered users and 396 guests