【发布时间】:2015-04-25 19:08:05
【问题描述】:
我需要在两个 AutoHotkey 键映射配置之间切换。我想通过 F3 切换两者。根据我在网上和 StackOverflow 上的研究,我认为以下内容应该可以满足我的要求:
#ifwinactive
next_make_mac = %1%
msgbox next_make_mac: %next_make_mac%
#If next_make_mac
msgbox Setting Mac settings.
RAlt::Control
Escape::Delete
RWin::Escape
LWin::LAlt
LAlt::LWin
next_make_mac := false
msgbox Mac settings set.
#If
#If !next_make_mac
msgbox Setting PC settings.
Ralt::Escape
msgbox PC settings set.
next_make_mac := true
#If
msgbox %next_make_mac%
F3::
Run %A_AhkPath% %A_ScriptName% %next_make_mac%
return
但是,#If next_make_mac 指令始终评估为真。我不确定这是为什么。事实上,即使我输入了next_make_mac := false,它仍然评估为真。有没有更好的方法来做我正在做的事情?
我正在运行 AutoHotkey 1.1.21.03
【问题讨论】:
标签: autohotkey