admin 管理员组

文章数量: 887016

按键精灵

插件关于窗口的各种操作

Call RunApp("notepad.exe")
Delay 2000
Hwnd = Plugin.Window.Find("Notepad", 0)
TracePrint "得到记事本的句柄" & Hwnd////当前窗口路径查询
//Path = Plugin.window.GetExePath(Hwnd)
//TracePrint"记事本路径为"&Path//是否存在这个窗口,存在返回值为1,否则返回值为0
//Window1 = Plugin.Window.IsWindow(Hwnd)   
//If Window1 = 1 Then  
//    MsgBox "窗口打开中"  
//Else    
//    MsgBox "窗口没有打开"  
//End If   //得到窗口类名
//Class1 = Plugin.window.GetClass(Hwnd)
//TracePrint"得到的窗口类名"&Class1//得到窗口标题
//Title = Plugin.window.GetText(Hwnd)
//TracePrint "得到的标题为"&Title//Call plugin.window.Size(Hwnd,400,300)//调整窗口大小//Call Plugin.Window.Top(Hwnd,1)//0为置顶,1为取消置顶//Call plugin.window.Move(Hwnd,100,100)//移动到坐标100,100//Call Plugin.Window.Active(Hwnd)
//TracePrint "激活窗口"//Call Plugin.Window.Close(Hwnd)
//TracePrint "关闭窗口"//Call Plugin.Window.Max(Hwnd)
//TracePrint "最大化窗口"//Call Plugin.Window.Restore(Hwnd)
//TracePrint"还原窗口"//Call plugin.window.Min(Hwnd)
//TracePrint "最小化窗口"//Call Plugin.window.Hide(Hwnd)
//TracePrint "窗口被隐藏"//Call Plugin.window.Show(Hwnd)
//TracePrint "窗口被显示"

本文标签: 按键精灵