加载时暂停 AutoHotkey 组合
Suspending an AutoHotkey combination when loaded
我正在使用 AHK 脚本,它可以让我将笔记本电脑键盘的数字行映射到小键盘,这样我就可以键入 ALT 代码。我已经将它映射为 suspended/unsuspended 和一个特殊的组合键:^SC11E
(SC11E) 是我戴尔键盘上一个键的 ASCII 码。
但是,这会产生一个问题,当 AHK 第一次加载脚本时,映射已经完成,因此我无法在不先暂停脚本的情况下输入 !@#$%^&*()
等特殊字符。
有没有办法在暂停状态下加载脚本,或者加载后立即暂停脚本。
这是我的脚本:
; Remap Numpad
; https://www.youtube.com/watch?v=ErNQz5PC73c
; NumPad-CODE
; remapping "normal" number keys to make them
; behave like numpad numbers
0::Numpad0
1::Numpad1
2::Numpad2
3::Numpad3
4::Numpad4
5::Numpad5
6::Numpad6
7::Numpad7
8::Numpad8
9::Numpad9
;using the "Ctrl + Toggle Mousepad" to turn on/off remapping code
^SC11E::
Suspend,Toggle
return
到目前为止,我尝试过的是在脚本末尾手动发送 !SC11E
组合,如下所示:
... ;code from previous snippet
return
Send ^{SC11E} ;Try to suspend the script - 1st try
Send ^SC11E ; Try to suspend the script - 2nd try
Suspend ;Try to suspend the script - 3rd try
但是 none 这些方法有效...我该怎么做?
Any hotkey/hotstring subroutine whose very first line is Suspend (except Suspend On) will be exempt from suspension. In other words, the hotkey will remain enabled even while suspension is ON. This allows suspension to be turned off via such a hotkey.
suspend ; suspend hotkeys at start
0::Numpad0
1::Numpad1
2::Numpad2
3::Numpad3
4::Numpad4
5::Numpad5
6::Numpad6
7::Numpad7
8::Numpad8
9::Numpad9
SC11E::suspend
我正在使用 AHK 脚本,它可以让我将笔记本电脑键盘的数字行映射到小键盘,这样我就可以键入 ALT 代码。我已经将它映射为 suspended/unsuspended 和一个特殊的组合键:^SC11E
(SC11E) 是我戴尔键盘上一个键的 ASCII 码。
但是,这会产生一个问题,当 AHK 第一次加载脚本时,映射已经完成,因此我无法在不先暂停脚本的情况下输入 !@#$%^&*()
等特殊字符。
有没有办法在暂停状态下加载脚本,或者加载后立即暂停脚本。
这是我的脚本:
; Remap Numpad
; https://www.youtube.com/watch?v=ErNQz5PC73c
; NumPad-CODE
; remapping "normal" number keys to make them
; behave like numpad numbers
0::Numpad0
1::Numpad1
2::Numpad2
3::Numpad3
4::Numpad4
5::Numpad5
6::Numpad6
7::Numpad7
8::Numpad8
9::Numpad9
;using the "Ctrl + Toggle Mousepad" to turn on/off remapping code
^SC11E::
Suspend,Toggle
return
到目前为止,我尝试过的是在脚本末尾手动发送 !SC11E
组合,如下所示:
... ;code from previous snippet
return
Send ^{SC11E} ;Try to suspend the script - 1st try
Send ^SC11E ; Try to suspend the script - 2nd try
Suspend ;Try to suspend the script - 3rd try
但是 none 这些方法有效...我该怎么做?
Any hotkey/hotstring subroutine whose very first line is Suspend (except Suspend On) will be exempt from suspension. In other words, the hotkey will remain enabled even while suspension is ON. This allows suspension to be turned off via such a hotkey.
suspend ; suspend hotkeys at start
0::Numpad0
1::Numpad1
2::Numpad2
3::Numpad3
4::Numpad4
5::Numpad5
6::Numpad6
7::Numpad7
8::Numpad8
9::Numpad9
SC11E::suspend