在系统SKU LENOVO_MT_81CU_BU_idea_FM_YOGA 730-15IKB笔记本电脑上运行Win 10版本10.0.19043 Build 19043的AutoHotKey版本3.0.06.01。
我读过很多关于AHK在Win10 OS上的表现不符合预期的帖子。我遵循了这些说明:重启、卸载/重新安装、更改UAC设置、使用run as admin、检查病毒软件等。
我是非常新的,只尝试了非常基本的脚本:发送Hello World,Msgbox Hello World等。通过简单地选择所指示的热键,这些功能似乎工作得很好。然而,
问题:当尝试使用Run EG时。
^j:: Run Notepad.exe or ; an executable
^1:: Run C:\HamSphere\UnaMas.xlsm ; a file
我必须这样做
1. select the saved file
2. right click and select run script
3. (the hotkeys icon displays in the tray)
4. then select the indicated hot keys
以使脚本按预期运行。我不能简单地选择所指示的热键。编译该文件没有任何帮助。
问:这正常吗?如果是这样的话,它似乎违背了热键的目的。
TIA doco
发布于 2021-09-05 22:46:00
显然,
1. right clicking the *.ahk file and selecting the [Run Script] menu item
2. compile the script to an executable then double click that executable
将使脚本准备就绪并在后台运行,如托盘中的绿色图标所示。这样就可以使用脚本中定义的任何热键来运行。当窗口关闭或用户右键单击关联的
图像,然后从随后的下拉列表中选择Exit。
要真正去获取exe/文件,有点不太可能。
发布于 2021-09-06 16:58:44
你不需要编译脚本。
有3个主要的选项可以让你的脚本在启动时执行。
1. The directory which contains the AutoHotkey executable.
2. The current user's Documents folder.
如果你不想让你的文件被命名为AutoHotkey.ahk,你可以把它保存到别的地方,然后用Run from AutoHotkey.ahk调用它。
https://stackoverflow.com/questions/69067424
复制相似问题