Skip to content

Commit

Permalink
Fixed taskbar bug & allowed customisation
Browse files Browse the repository at this point in the history
Clicking on the taskbar no longer clicks indefinitely

Added SClicker.ini that allows wait time/polling time/hotkey to be adjusted
  • Loading branch information
Itsskiip committed Feb 15, 2022
1 parent 68180ba commit a9b2fc5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions SClicker.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ SetWorkingDir %A_ScriptDir%
#SingleInstance Force
#MaxThreadsPerHotkey 2
SetBatchLines -1
CoordMode Mouse

WaitTime := 100 ;How long the mouse has to be stationary for before a click is registered in miliseconds
PollingTime := 10 ;How often the script checks for mouse movement in miliseconds
IniRead WaitTime, SClicker.ini, Settings, WaitTime
IniRead PollingTime, SClicker.ini, Settings, PollingTime
IniRead Hkey, SClicker.ini, Settings, Hotkey

Hotkey %Hkey%, run
Toggle := False

F10:: ;The hotkey to toggle the script
return

run:
ClickedAlready := True
Toggle := !Toggle
Loop {
If not Toggle
break


if (!MouseMoved(PollingTime)){
if (!ClickedAlready and !MouseMoved(WaitTime - PollingTime)){
ClickedAlready := True
Expand Down
4 changes: 4 additions & 0 deletions SClicker.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Settings]
WaitTime=100
PollingTime=10
Hotkey=F10

0 comments on commit a9b2fc5

Please sign in to comment.