自动热键鼠标变为非活动状态



刚从AHK开始,并希望使用GPU-Z和资源监视器自动进行一些PC性能监控。我正在尝试编写一个简单的脚本来启动每个程序的数据记录过程。我还没有完成脚本,因为一旦我激活了 GPU-Z 窗口,我就无法让鼠标做任何事情。我可能缺少一些非常简单的东西,但我无法解决。

#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
^F2::
If WinExist("ahk_class #32770")
{
MouseMove 490, 90, 100 ;Mouse moves all ok first time script is run
WinActivate
ControlClick Button17 ;Click the "Log to file" button --> doesn't work
}
Else
{
;Blank for now
}
If WinExist("ahk_class MMCMainFrame")
{
MouseMove 100, 100, 100, R ;Mouse does not move at all
WinActivate
}
Else
{
;Blank for now
}
return

事实证明这是一个权限/安全问题。以管理员身份运行脚本解决了它。

相关内容

最新更新