请教如何绑定某个窗口运行。。

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: 请教如何绑定某个窗口运行。。

Re: 请教如何绑定某个窗口运行。。

Post by JTY1379 » 21 Feb 2023, 20:21

在文件的最前面添加下面的一行,后面的热键就只在这个窗口才生效,别的窗口就无效:
#IfWinActive, 无标题 - 记事本

Re: 请教如何绑定某个窗口运行。。

Post by fwejifjjwk2 » 20 Jan 2023, 07:35

ahk v2 demo

Code: Select all

#HotIf WinActive("ahk_exe Explorer.EXE")

; 這裡寫 key binding
#n::WinMinimize "A"

#Hotif

请教如何绑定某个窗口运行。。

Post by zysjzw » 15 Jan 2023, 21:26

Code: Select all

E::
Send {E}
Sleep E
Send {Q}
Sleep Q
Return
SPACE::
Send {1}
Sleep 1
Send {2}
Sleep 2
Send {3}
Sleep 3
Send {4}
Sleep 4
Return
就是这样很简单的脚本,按空格就自己喝药,按E就同时释放E跟Q的技能。。现在的问题是玩游戏的途中,如果切换到浏览器查资料或者聊天打字,按空格就直接出1234了,非常麻烦。。。请问如何让上面的脚本只在指定的某个游戏窗口运行。。

Top