Windows 10 中的 AutoHotkey - 热键在某些应用程序中不起作用 [英] AutoHotkey in Windows 10 - Hotkeys not working in some applications

查看:40
本文介绍了Windows 10 中的 AutoHotkey - 热键在某些应用程序中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

像一个简单的脚本

a::msgbox hi!

过去在 Windows 7 下运行良好.现在我升级到 Windows 10,当某些窗口处于活动状态时它不起作用.特别是 LButton - 热键会搞砸一切,导致你真的需要任务管理器的情况.

used to work fine under Windows 7. Now that I upgraded to Windows 10, it isn't working when certain windows are active. Specially LButton-Hotkeys can mess up everything, leading to the situation where you actually need Task Manager.

这里有一小部分应用程序不再识别热键:(相反,在上面的脚本中,发送了一个简单的a)

Here is a small list of applications in which hotkeys are not recognized anymore: (instead, as of the above script, a simple a is sent)

  • 团队发言 3
  • 一切
  • Fraps

它的工作原理:(示例)

Where it does work: (examples)

  • 编辑器
  • Skype
  • 一般 Windows 应用
  • Ahk 帮助
  • 开放式办公室
  • (大多数程序)

有人可以复制这个吗?

Win10 中的 AutoHotkey 有什么问题?

What's wrong with AutoHotkey in Win10?

如何解决这个问题?

(AHKscript 版本 1.1.22.3 Unicode 64 位)

(AHKscript vers. 1.1.22.3 Unicode 64-bit)

推荐答案

由于 Windows 10 刚刚发布,这是一个非常相关的问题,我相信许多用户会喜欢帮助他们的脚本在此上正常运行新操作系统.可能有人认为这个问题的范围太广或者分类不当,因为它是 Windows 问题而不是特定的 AutoHotkey 问题?

Being that Windows 10 was just released, this is very relevant question and I'm sure that many users will appreciate help in getting their scripts to run properly on this new OS. It's possible someone thought that this question was to broad in scope or maybe improperly classified, as it's a Windows issue rather than a specific AutoHotkey problem?

据我了解,问题在于新的 UAC 设置.一个简单的解决方案是以管理员身份运行您的脚本.为此,请右键单击该文件 -> 选择以管理员身份运行"

From my understanding the issue lies in new UAC settings. A simple solution is to run your script as an Administrator. To do this right click on the file -> select "Run as Administrator"

关于始终以管理员身份运行应用程序或文件(在 Windows 10 中),我没有直接回答,但我发现本指南似乎涵盖了在 Windows 10 中执行此操作的所有可能方式.

I don't have a direct answer to give regarding running an application or file always as an Admin (in Windows 10), but this guide I found seems to cover every way possible to do so in Windows 10.

http://www.tenforums.com/教程/3436-run-administrator-windows-10-a.html

另一种选择是让脚本检查它是否以管理员身份运行,如果不是以管理员身份重新加载.代码是从帮助文件中提取的:

Another alternative is to have the script check if it is running as Admin, if not reload as Admin. Code was pulled from the Help File:

if not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"  ; Requires v1.0.92.01+
   ExitApp
}

这篇关于Windows 10 中的 AutoHotkey - 热键在某些应用程序中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆