跳到主要内容

GetKeyFocusWnd 得到焦点窗口

🎯功能

获取当前键盘焦点的窗口句柄

📜语法

结果 = Plugin.Window.GetKeyFocusWnd()

📥参数

📤返回

长整型数, 返回拥有键盘焦点的窗口句柄

💡示例

RunApp "notepad.exe"
Delay 1000
hwnd=Plugin.Window.GetKeyFocusWnd()
Call Plugin.Bkgnd.KeyDown(hwnd,asc("A"))
Call Plugin.Bkgnd.KeyUp(hwnd,asc("A"))
Call Plugin.Bkgnd.KeyPress(hwnd,asc("B"))

📘备注