autohotkey WOW双开脚本写好了也没有出错 但是怎么开始运行脚本呢!~

以下是写出的脚本 运行也没有出错 WOW 2#宏的命令也写好的,单独运行也没有出错,但是贴上脚本 怎么运行呢 WOW 1# 按键, 1 按了 WOW 2# 还是没反应啊!~

#Persistent

WinGet, wowid, List, 魔兽世界

~1::
KeyWait 1
IfWinActive, 魔兽世界
{
ControlSend,, 1, ahk_id %wowid1%
ControlSend,, 1, ahk_id %wowid2%

Return
}
WinGet, wowid, List, 魔兽世界
~2::
KeyWait 2
IfWinActive, 魔兽世界
{
ControlSend,, 2, ahk_id %wowid1%
ControlSend,, 2, ahk_id %wowid2%

Return
}
WinGet, wowid, List, 魔兽世界
~3::
KeyWait 3
IfWinActive, 魔兽世界
{
ControlSend,, 3, ahk_id %wowid1%
ControlSend,, 3, ahk_id %wowid2%

Return
}
WinGet, wowid, List, 魔兽世界
~e::
KeyWait e
IfWinActive, 魔兽世界
{
ControlSend,, e, ahk_id %wowid1%
ControlSend,, e, ahk_id %wowid2%

Return
}
WinGet, wowid, List, 魔兽世界
~r::
KeyWait r
IfWinActive, 魔兽世界
{
ControlSend,, r, ahk_id %wowid1%
ControlSend,, r, ahk_id %wowid2%

Return
}
WinGet, wowid, List, 魔兽世界
~t::
KeyWait t
IfWinActive, 魔兽世界
{
ControlSend,, t, ahk_id %wowid1%
ControlSend,, t, ahk_id %wowid2%

Return
}

WinGet, wowid, List, 魔兽世界
~z::
KeyWait z
IfWinActive, 魔兽世界
{
ControlSend,, z, ahk_id %wowid1%
ControlSend,, z, ahk_id %wowid2%

Return
}
WinGet, wowid, List, 魔兽世界
~v::
KeyWait v
IfWinActive, 魔兽世界
{
ControlSend,, v, ahk_id %wowid1%
ControlSend,, v, ahk_id %wowid2%

Return
}

WinGet, wowid, List, 魔兽世界
~q::
KeyWait q
IfWinActive, 魔兽世界
{
ControlSend,, q, ahk_id %wowid1%
ControlSend,, q, ahk_id %wowid2%

Return
}

WinGet, wowid, List, 魔兽世界
~4::
KeyWait 4
IfWinActive, 魔兽世界
{
ControlSend,, 4, ahk_id %wowid1%
ControlSend,, 4, ahk_id %wowid2%

Return
}

WinGet, wowid, List, 魔兽世界
~5::
KeyWait 5
IfWinActive, 魔兽世界
{
ControlSend,, 5, ahk_id %wowid1%
ControlSend,, 5, ahk_id %wowid2%

Return
}
我自己已经做出来了 有需要的朋友可以去我的空间日志看下
http://user.qzone.qq.com/77309568/blog/1286859944

上个问题没试验过 没能成功实在是对不住
这次的试验了一下 顺便帮你把上面的脚本改了
我在记事本上试验成功了
希望对你有帮助
另外最好窗口化运行魔兽世界 因为不玩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
#################################################################来自:求助得到的回答
温馨提示:答案为网友推荐,仅供参考
相似回答