Here's the piece of the code that i isolated:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
toggle := !toggle
F10::
toggle := !toggle
if toggle
{
Progress, m2 b fs36 zh0, TK:F10 `nHK:E `nE spam ON, , , Franklin Gothic
Sleep, 1000
Progress, Off
}
else
{
Progress, m2 b fs36 zh0, TK:F10 `nHK:E `nE spam OFF, , , Franklin Gothic
Sleep, 1000
Progress, Off
}
return
#if ( toggle )
$*e::
While ( GetKeyState( "e","P" ) )
{
Sleep, 5
Send, {Blind}{e}
Sleep, 10
}
Return
#if
F12::
ExitApp
removing #if's from my script does prevent it from breaking, but as far as alternatives go i can't use suspend because it shuts down the other parts of the script not shown here, and putting a simple " if " statement after the " $*e:: " does work, when i toggle it off pressing " e " will do nothing and i need to act it as regular e key when the spamming isn't toggled.
I'm so confused
![Crazy :crazy:](./images/smilies/icon_crazy.gif)