Hi all, this is my first post here and i would like to thank anyone for the answer.
i am in need of a loop:
This is what i am using now:
$1::
Loop
{
if not GetKeyState("1", "P")
break
Send 1
sleep 30
}
return
$2::
Loop
{
if not GetKeyState("2", "P")
break
Send 2
sleep 30
}
return
$3::
Loop
{
if not GetKeyState("3", "P")
break
Send 3
sleep 30
}
return
$4::
I would like to press the key one time and the loop goes on until i press the same key again or an other key, If i press an other key the other loop starts. Is it possible?
Thank you
creating a loop
Re: creating a loop
Hallo,
try:or the same shorter:or:
try:
Code: Select all
$1::
$2::
$3::
If (Key = A_ThisHotkey)
{
Key := ""
SetTimer, Key, Off
}
Else
{
Key := A_ThisHotkey
SetTimer, Key, 30
}
Return
Key:
Send, % SubStr(Key,0)
Return
Code: Select all
$1::
$2::
$3::
If (Key = A_ThisHotkey), Key := ""
SetTimer, Key, Off
Else Key := A_ThisHotkey
SetTimer, Key, 30
Return
Key:
Send, % SubStr(Key,0)
Return
Code: Select all
$1::
$2::
$3::
Key := Key = A_ThisHotkey ? "":A_ThisHotkey
SetTimer Key,% Key ? "30":"Off"
Return
Key:
Send, % SubStr(Key,0)
Return
Who is online
Users browsing this forum: No registered users and 45 guests