测试按键精灵脚本【如何干倒工作室就靠这自动化脚本】开始刷R14,督军
我的脚本1_2020515123.Q
[General]
SyntaxVersion=2
BeginHotkey=121
BeginHotkeyMod=0
PauseHotkey=0
PauseHotkeyMod=0
StopHotkey=123
StopHotkeyMod=0
RunOnce=1
EnableWindow=
MacroID=17711ebe-dee7-4100-877f-98ceb167e95a
Description=我的脚本1
Enable=1
AutoRun=0
[Repeat]
Type=0
Number=1
[Relative]
SetupOCXFile=
[Comment]
[Script]
//Call RunApp("notepad.exe")
Delay 5000
//下面这句是得到当前最前面的窗口句柄
Hwnd = Plugin.Window.Foreground()
MsgBox "得到当前最前面的窗口句柄为:"& Hwnd
//下面这句是得到窗口句柄的类名
Class1 = Plugin.Window.GetClass(Hwnd)
MsgBox "得到窗口句柄的类名为:" & Class1
Delay 5000
//Hwnd = Plugin.Window.Find("GxWindowClass", "魔兽世界")
Hwnd = Plugin.Window.Find("GxWindowClass", "暴雪战网")
MsgBox "得到当前最前面的窗口句柄为:"& Hwnd
Delay 5000
Call Plugin.Bkgnd.MoveTo(Hwnd, 100, 100)
Call Plugin.Bkgnd.KeyPress(Hwnd, 32)
Call Plugin.Bkgnd.KeyDown(Hwnd, 38)
Delay 5000
Call Plugin.Bkgnd.KeyUp(Hwnd, 38)