Skip to content

Commit

Permalink
Disable hotkey instead of setting variable to 1
Browse files Browse the repository at this point in the history
Added SingleInstance
Rerun clickInput() when input is cancelled
  • Loading branch information
Banaanae authored Feb 16, 2023
1 parent 3ee0ebc commit c144fa1
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions legacy.ahk
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
clickAmount = 1
#SingleInstance, Force
Hotkey, LButton, Off

MsgBox, 64, Welcome!, Welcome to Cheat Clicker`nCheat Clicker is pretty easy to use`nJust set the amount of times you want to click each time you click and press Enter`n`nHere are some useful hotkeys:`nF5 - Allows you to edit the click amount`nCtrl + F5 - Force exit Cheat Clicker`nNote: In some cases you might need to also use the fn key
MsgBox, 64, Welcome!, Welcome to Cheat Clicker Legacy`nIt`'s pretty easy to use`nJust set the amount of times you want to click each time you click and press Enter`n`nHere are some useful hotkeys:`nF5 - Allows you to edit the click amount`nCtrl + F5 - Exit Cheat Clicker

clickInput()
{
global clickAmount
InputBox, clickAmount, Welcome!, Welcome to Cheat Clicker!`nHow many clicks do you want to do per click?`nCan only contain 0-9, SHOW, Default, Default, Center, Center, Locale,, 2
global
InputBox, clickAmount, Welcome!, Welcome to Cheat Clicker Legacy!`nHow many clicks do you want to do per click?`nCan only contain 0-9, SHOW, Default, Default, Center, Center, Locale,, 2
if ErrorLevel
clickInput()

if clickAmount is not digit
{
Loop
{
clickAmount := 1
InputBox, clickAmount, Welcome!, Welcome to Cheat Clicker!`nHow many clicks do you want to do per click?`nCan only contain keys 0-9, SHOW, Default, Default, Center, Center, Locale,, 2
Hotkey, LButton, Off
InputBox, clickAmount, Welcome!, Welcome to Cheat Clicker!`nHow many clicks do you want to do per click?`nYou must ONLY type characters 0 to 9, SHOW, Default, Default, Center, Center, Locale,, 2
if ErrorLevel
clickInput()
if clickAmount is digit
Break
}
}
Hotkey, LButton, On
}

clickInput()
Expand All @@ -29,10 +35,10 @@ loop, %clickAmount%
Return

F5::
clickAmount = 1
Hotkey, LButton, Off
clickInput()
Return

^F5::
ExitApp
Return
Return

0 comments on commit c144fa1

Please sign in to comment.