Skip to content

Commit

Permalink
closes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Banaanae authored Sep 15, 2022
1 parent b193e12 commit 2d6164d
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions source.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
clicks := 1
stopKeyCC := ""
previousHotkeyCC := ""
activeCC := "false"

stopKeyAC := ""
previousHotkeyAC := ""
active := "false"
activeAC := "false"

cheatClicker()
{
Expand Down Expand Up @@ -44,7 +45,7 @@ autoClicker()
Return
}

autoClickerStart(Amount, clickType, delay, active)
autoClickerStart(Amount, clickType, delay, activeAC)
{
if (Amount = 0)
{
Expand All @@ -63,7 +64,7 @@ autoClickerStart(Amount, clickType, delay, active)
Click, Middle
}
Sleep, %delay%
} until active = "false"
} until activeAC = "false"
}
Else
{
Expand All @@ -82,8 +83,8 @@ autoClickerStart(Amount, clickType, delay, active)
Click, Middle
}
Sleep, %delay%
} until active = "false"
active := "false"
} until activeAC = "false"
activeAC := "false"
}
}

Expand All @@ -106,6 +107,7 @@ if (clicks = 1)
{
Hotkey, LButton, Off
}
activeCC := "true"
Return

Cheat:
Expand All @@ -126,11 +128,15 @@ if !stopKeyCC
}
Hotkey, %stopKeyCC%, ResetCheatClicker, On
previousHotkeyCC := stopKeyCC
activeCC := "false"
Return

ResetCheatClicker:
Hotkey, LButton, Off
WinActivate, Cheat Clicker
if (activeCC = "true")
{
Hotkey, LButton, Off
WinActivate, Cheat Clicker
}
Return

ButtonOpenAutoclicker:
Expand All @@ -146,9 +152,9 @@ GuiControlGet, Delay
GuiControlGet, Amount
GuiControlGet, stopKeyAC
GuiControlGet, clickType
active := "true"
activeAC := "true"
WinMinimize, Autoclicker
autoClickerStart(Amount, clickType, delay, active)
autoClickerStart(Amount, clickType, delay, activeAC)
Return

stopKeyAC:
Expand All @@ -160,20 +166,20 @@ if !stopKeyAC
{
Return
}
if (active = "true")
if (activeAC = "true")
{
active := "false"
activeAC := "false"
}
Else
{
active := "true"
autoClickerStart(Amount, clickType, delay, active)
activeAC := "true"
autoClickerStart(Amount, clickType, delay, activeAC)
}
previousHotkeyAC := stopKeyAC
Return

ButtonStop:
active := "false"
activeAC := "false"
Return

ButtonReturntoCheatClicker:
Expand All @@ -187,4 +193,4 @@ ifMsgBox, Yes
{
ExitApp
}
Return
Return

0 comments on commit 2d6164d

Please sign in to comment.