Page 1 of 1
Hey there i'm trying to understand why does this script not work
Posted: 22 Apr 2018, 06:34
by Maor_S
::F2
{
While(1==1)
{
{SPACE down}{A down}
Sleep , 500
{SPACE up}{A up}
{SPACE down}{D down}
Sleep , 500
{SPACE up}{D up}
}
}
Cheers would appreciate if you would fix it
Re: Hey there i'm trying to understand why does this script not work
Posted: 22 Apr 2018, 06:57
by swagfag
Re: Hey there i'm trying to understand why does this script not work
Posted: 22 Apr 2018, 07:26
by SirRFI
::F2 - you reverted it, should be
F2::.
{SPACE down}{A down} - this is invalid. See
Send.
While(1==1) - this will cause infinite loop after pressing the hotkey for first time. You may want to do some kind of toggle.
Ps.
true instead of
1==1 is more elegant.
Re: Hey there i'm trying to understand why does this script not work
Posted: 22 Apr 2018, 08:07
by Maor_S
SirRFI wrote:::F2 - you reverted it, should be
F2::.
{SPACE down}{A down} - this is invalid. See
Send.
While(1==1) - this will cause infinite loop after pressing the hotkey for first time. You may want to do some kind of toggle.
Ps.
true instead of
1==1 is more elegant.
Thanks alot mate Cheers
Re: Hey there i'm trying to understand why does this script not work
Posted: 22 Apr 2018, 09:07
by Maor_S
Re: Hey there i'm trying to understand why does this script not work
Posted: 22 Apr 2018, 09:46
by SirRFI
Looks like
UTF-8 BOM is appending to your
Hotkey. Run the script using Unicode version, such as U32. Moving the hotkey out from first line may be in help too.