【发布时间】:2019-12-20 06:18:09
【问题描述】:
我编写了一个简单的代码来切换某些东西。我目前正试图让这个脚本只在它存在时才能在像 Fallout4 这样的游戏上运行。当它失去对该窗口的焦点时自动暂停。
*RButton::
*Control::
*Shift::
while (GetKeyState("Ctrl", "T") ^ GetKeyState("Shift", "T"))
{
while (GetKeyState("RButton", "P"))
{
;Some Action
}
;Some Action
return
}
return
*F8::Suspend
*F9::Exitapp
SetTitleMatchMode, 2
#IfWinActive SomeApplication.exe
;Run This Script
#IfWinNotActive SomeApplication.exe
;Suspend+Pause This Script
return
Exit:
ExitApp
Return
我无法使这部分与 Fallout4 一起工作,它根本无法检测到它,但与记事本配合得很好,但我必须在 #IfWinActive 之后手动执行该部分
SetTitleMatchMode, 2
#IfWinActive ahk_exe Fallout4.exe
;Run THIS Script
#IfWinNotActive ahk_exe Fallout4.exe
;Suspend+Pause This Script
【问题讨论】:
标签: autohotkey