msgbox "请依次在需要同步的窗口内按下1,2,3,4,5。
如果窗口已够,则按下空格"for 5 MsgBox "请按顺序按下指定按键" key=waitkey() if key=49 then Hwnd1 = Plugin.Window.Foreground() elseif key=50 then Hwnd2 = Plugin.Window.Foreground() elseif key=51 then Hwnd3= Plugin.Window.Foreground() elseif key=52 then Hwnd4 = Plugin.Window.Foreground() elseif key=53 then Hwnd5 = Plugin.Window.Foreground() elseif key=32 then exit for End IfnextMsgBox "同步开始"Do a = waitkey()If a=49 or a=50 or a=51 or a=52 or a=53 or a=54 or a=55 or a=56 or a=57 or a=58 or a=59 or a=60 or a=87 or a=65 or a=68 or a=83 Then if hwnd1 > 0 then Call Plugin.Bkgnd.KeyPress(Hwnd1, a) End If if hwnd2 > 0 then Call Plugin.Bkgnd.KeyPress(Hwnd2, a) End If if hwnd3 > 0 then Call Plugin.Bkgnd.KeyPress(Hwnd3, a) End If if hwnd4 > 0 then Call Plugin.Bkgnd.KeyPress(Hwnd4, a) End If if hwnd5 > 0 then Call Plugin.Bkgnd.KeyPress(Hwnd5, a) End IfEnd If loo。