2010年8月28日 星期六

按鍵精靈 小程式

其中有用的是,搜尋視窗名稱,切換到視窗


Hwnd = Plugin.Window.Search("Zcoco")
Hwnd = replace(Hwnd, "|" , "") //Hwnd 為陣列型式,如有搜尋到多個,將以 | 分隔,固去除 | ,讓切換視窗能夠順利執行
Call Plugin.Window.Active(Hwnd)




'==========以下是按鍵精靈錄製的內容
Hwnd = Plugin.Window.Search("Zcoco")
Hwnd = replace(Hwnd, "|" , "")
Call Plugin.Window.Active(Hwnd)
// MsgBox "find " & Hwnd

//MoveTo 509, 548
//Delay 8
MoveTo 509, 549
Delay 360
LeftClick 1

KeyDown "Enter", 1
Delay 71
KeyUp "Enter", 1
Delay 1
Delay 100
KeyDown "Up", 1
Delay 2
KeyUp "Up", 1
Delay 2000

Hwnd = Plugin.Window.Search("Eclipse")
Hwnd = replace(Hwnd, "|" , "")
Call Plugin.Window.Active(Hwnd)
//MsgBox "find " & Hwnd

// KeyDown "Alt", 1
// KeyUp "Tab", 1
// Delay 200
// Delay 18
// KeyUp "Alt", 1
Delay 500
KeyDown "Ctrl", 1
Delay 250
Delay 6
KeyDown "F11", 1
Delay 161
KeyUp "F11", 1
Delay 25
KeyUp "Ctrl", 1
Delay 2000

Hwnd = Plugin.Window.Search("Zcoco")
Hwnd = replace(Hwnd, "|" , "")
Call Plugin.Window.Active(Hwnd)


//KeyDown "Alt", 1
//Delay 374
//KeyUp "Tab", 1
//Delay 369
//KeyUp "Alt", 1
//Delay 100
'==========以上是按鍵精靈錄製的內容==========

沒有留言: