求组,同步方向键盘
autohotkey吧
全部回复
仅看楼主
level 1
Xmas情绪哥 楼主
窗口名=魔兽世界
#IfWinActive,魔兽世界
return
f12::
if (xh){
xh=0
}else{
xh++
}
if xh=0
ControlGet,AHK_ID,Hwnd ,,,%窗口名%
if xh=1
ControlGet,AHK_ID2,Hwnd ,,,%窗口名%
MsgBox,窗口1ID=%AHK_ID%窗口2ID=%AHK_ID2%
return
Up::
ControlSend,ahk_parent,{up Down},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{Up Down},ahk_id %AHK_ID%
KeyWait,Up
ControlSend,ahk_parent,{UpDown up},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{UpDown up},ahk_id %AHK_ID%
return
a::
ControlSend,ahk_parent,{a Down},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{a Down},ahk_id %AHK_ID%
KeyWait,a
ControlSend,ahk_parent,{a up},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{a up},ahk_id %AHK_ID%
return
s::
ControlSend,ahk_parent,{s Down},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{s Down},ahk_id %AHK_ID%
KeyWait,s
ControlSend,ahk_parent,{s up},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{s up},ahk_id %AHK_ID%
return
d::
ControlSend,ahk_parent,{d Down},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{d Down},ahk_id %AHK_ID%
KeyWait,d
ControlSend,ahk_parent,{d up},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{d up},ahk_id %AHK_ID%
return
down::
ControlSend,ahk_parent,{down Down},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{down Down},ahk_id %AHK_ID%
KeyWait,down
ControlSend,ahk_parent,{down up},ahk_id %AHK_ID2%
ControlSend,ahk_parent,{down up},ahk_id %AHK_ID%
return
2025年11月10日 04点11分 1
level 1
Xmas情绪哥 楼主
大佬们,向上和向下怎么同步不了
2025年11月10日 04点11分 2
level 1
Xmas情绪哥 楼主
@wo小熊o 大佬帮我看看
2025年11月10日 04点11分 3
level 1
Xmas情绪哥 楼主
[呼~]
2025年11月10日 07点11分 4
level 1
Xmas情绪哥 楼主
来大佬
2025年11月10日 09点11分 5
level 1
哎。。。问ai啊
2025年11月11日 02点11分 6
level 1
up热键释放写错了,释放的按键写成UpDown了,可能是这个原因。
hwnd其实可以用Winget一次性获取两个,不用那么麻烦
2025年12月06日 11点12分 7
1