Closed mystery4f closed 5 months ago
#UseHook true
add the $
prefix to all shortcuts, but can you explain me why this will perform better that normals shortcuts?
The TogglePause
in komorebic.lib.ahk
can now pause komorebic, but at this time the hotkey defined in ahk is still occupied and has no effect, so I feel that the ahk script can be "suspended" here:
seelen.ahk
TogglePausePlus() {
Suspend(-1)
TogglePause()
}
^#!p:: TogglePausePlus()
By doing this, we need to ensure that ^#!p
can still be used normally; this can be achieved by using #SuspendExempt
(ignore suspend).
At this point, only ^#!p
should be left in seelen.ahk
, and the rest of the custom shortcuts should be moved to shortcut.ahk
(the shortcuts that we need to pause).
#UseHook true
add the$
prefix to all shortcuts, but can you explain me why this will perform better that normals shortcuts? sorry ,I'm not expressing myself clearly.
The
TogglePause
inkomorebic.lib.ahk
can now pause komorebic, but at this time the hotkey defined in ahk is still occupied and has no effect, so I feel that the ahk script can be "suspended" here:seelen.ahk
TogglePausePlus() { Suspend(-1) TogglePause() } ^#!p:: TogglePausePlus()
By doing this, we need to ensure that
^#!p
can still be used normally; this can be achieved by using#SuspendExempt
(ignore suspend).At this point, only
^#!p
should be left inseelen.ahk
, and the rest of the custom shortcuts should be moved toshortcut.ahk
(the shortcuts that we need to pause).
Yes I understand this I decide implement other stuff instead of suspend to follow the user settings but in resume the pause will be:
^#!p:: {
PauseWM()
ExitApp()
}
I separate the script files for apps to avoid add shortcuts if user disable the app entirely, also to follow the encapsulation and SRP principles. The resume will be added to the main file to when this willl trigger the program will open again the shortcuts if the user have enabled the included AHK scripts.
This should be working on the next release. Separations of AHK by settings in c07a8e3578709368cbbb0b2af2bcab73076e69cd
seelen.ahk:
shortcut.ahk is the original seelen.ahk.