diff --git a/SClicker.ahk b/SClicker.ahk index 8091e16..8512d5b 100644 --- a/SClicker.ahk +++ b/SClicker.ahk @@ -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 diff --git a/SClicker.ini b/SClicker.ini new file mode 100644 index 0000000..0645189 --- /dev/null +++ b/SClicker.ini @@ -0,0 +1,4 @@ +[Settings] +WaitTime=100 +PollingTime=10 +Hotkey=F10 \ No newline at end of file