上个问题没试验过 没能成功实在是对不住
这次的试验了一下 顺便帮你把上面的脚本改了
我在记事本上试验成功了
希望对你有帮助
另外最好窗口化运行魔兽世界 因为不玩wow所以你自己试验一下
不行的话在补充
还有先运行2个魔兽再开脚本
###############################################################
#NoEnv
#SingleInstance, Force
#Persistent
Critical
SetTitleMatchMode, 2
Winget, wowid, list, 魔兽世界
WinSetTitle, ahk_id%wowid1%, , 魔兽世界1#
WinSetTitle, ahk_id%wowid2%, , 魔兽世界2#
1::
KeyWait 1
IfWinActive 魔兽世界
{
ControlSend,, 1, ahk_id %wowid1%
ControlSend,, 1, ahk_id %wowid2%
}
Return
2::
KeyWait 2
IfWinActive, 魔兽世界
{
ControlSend,, 2, ahk_id %wowid1%
ControlSend,, 2, ahk_id %wowid2%
}
Return
3::
KeyWait 3
IfWinActive, 魔兽世界
{
ControlSend,, 3, ahk_id %wowid1%
ControlSend,, 3, ahk_id %wowid2%
}
Return
e::
KeyWait e
IfWinActive, 魔兽世界
{
ControlSend,, e, ahk_id %wowid1%
ControlSend,, e, ahk_id %wowid2%
}
Return
r::
KeyWait r
IfWinActive, 魔兽世界
{
ControlSend,, r, ahk_id %wowid1%
ControlSend,, r, ahk_id %wowid2%
}
Return
t::
KeyWait t
IfWinActive, 魔兽世界
{
ControlSend,, t, ahk_id %wowid1%
ControlSend,, t, ahk_id %wowid2%
}
Return
z::
KeyWait z
IfWinActive, 魔兽世界
{
ControlSend,, z, ahk_id %wowid1%
ControlSend,, z, ahk_id %wowid2%
}
Return
v::
KeyWait v
IfWinActive, 魔兽世界
{
ControlSend,, v, ahk_id %wowid1%
ControlSend,, v, ahk_id %wowid2%
}
Return
q::
KeyWait q
IfWinActive, 魔兽世界
{
ControlSend,, q, ahk_id %wowid1%
ControlSend,, q, ahk_id %wowid2%
}
Return
4::
KeyWait 4
IfWinActive, 魔兽世界
{
ControlSend,, 4, ahk_id %wowid1%
ControlSend,, 4, ahk_id %wowid2%
}
Return
5::
KeyWait 5
IfWinActive, 魔兽世界
{
ControlSend,, 5, ahk_id %wowid1%
ControlSend,, 5, ahk_id %wowid2%
}
Return
#################################################################