[General]
Description=ӣWindow
BeginHotkey=121
BeginHotkeyMod=0
PauseHotkey=0
PauseHotkeyMod=0
StopHotkey=123
StopHotkeyMod=0
RunOnce=1
EnableWindow=
Enable=0
AutoRun=0
[Repeat]
Type=0
Number=1
[Relative]
SetupOCXFile=
[Comment]
Content=

[Script]
//OK
Dim MyArray
VBSCall RunApp("notepad.exe")
Delay 1000
//=================================================================================
//ǲҴ(0)߱("ޱ - ±"),ҵľHwnd
Plugin Hwnd = Window.Find(0, "ޱ - ±")
MsgBox "ҵĸھΪ"&Hwnd
//Ǹݸھ(Hwnd)Ӵƥ("Edit")ƥ(0),ҵƥľHwnd
Plugin Hwnd = Window.FindEx(Hwnd, 0, "Edit", 0)
MsgBox "ҵӴھΪ"&Hwnd
//=================================================================================
//Ǽ
Plugin Window.Active(Hwnd)
MsgBox "ǰ"
//ǵõǰǰĴھ
Plugin Hwnd = Window.Foreground()
MsgBox "õǰǰĴھΪ"&Hwnd
//С
Plugin Window.Min(Hwnd)
MsgBox "ǰС"
//ǻԭ
Plugin Window.Restore(Hwnd)
MsgBox "ǰԭ"
//󻯴
Plugin Window.Max(Hwnd)
MsgBox "ǰ"
//ǻԭ
Plugin Window.Restore(Hwnd)
MsgBox "ǰԭ"
//ǵõָĴھ
Plugin Hwnd0 = Window.MousePoint()
MsgBox "õָĴھΪ"&Hwnd0
//ش
Plugin Window.Hide(Hwnd)
MsgBox "ǰش"
//ʾ
Plugin Window.Show(Hwnd)
MsgBox "ǰʾ"
//=================================================================================
//ǵõھı߿С()
Plugin Rect = Window.GetWindowRect(Hwnd)
MsgBox "õھı߿С()Ϊ"&Rect
//ڷַָ,ֳַ
MyArray = Split(Rect, "|")
//佫ַתֵ
W1 = Clng(MyArray(0)): H1 = Clng(MyArray(1))
W2 = Clng(MyArray(2)): H2 = Clng(MyArray(3))
MsgBox "߿С       "  &  W2-W1 & "             " & H2-H1
//Ǹı䴰ڴСΪ(100, 100)
Plugin Window.Size(Hwnd, 100, 100)
MsgBox "ǰı䴰ڴС"
//ǵõھĿͻС
Plugin Rect = Window.GetClientRect(Hwnd)
MsgBox "õھĿͻСΪ"&Rect
//ڷַָ,ֳַ
MyArray = Split(Rect, "|")
//佫ַתֵ
L = Clng(MyArray(0)): T = Clng(MyArray(1))
R = Clng(MyArray(2)): B = Clng(MyArray(3))
//Ǹı䴰ڴСΪ(W, H)
Plugin Window.Size(Hwnd, W2-W1, H2-H1)
MsgBox "ǰı䴰ڴС"
//=================================================================================
//ƶڵ(100, 100)λ
Plugin Window.Move(Hwnd, 100, 100)
MsgBox "ǰƶڵ(100, 100)λ"
//жϴǷ
Plugin Window = Window.IsWindow(Hwnd)
If Window = 1
    MsgBox "ڴ"
Else 
    MsgBox "ûд"
EndIf 
//ǵõھı
Plugin Text = Window.GetText(Hwnd)
MsgBox "õھıΪ"&Text
//ǵõھ
Plugin Class1 = Window.GetClass(Hwnd)
MsgBox "õھΪ"&Class1
//=================================================================================
//Ǳϴڱ("±")ľ浽(HwndEx)
Plugin HwndEx = Window.Search("±")
MsgBox "ҵϵĴھΪ"&HwndEx
//ڷַָ,ֳַ
MyArray = Split(HwndEx, "|")
If UBound(MyArray)>=0
    i=0
    For UBound(MyArray)
        //佫ַתֵ
        Msgbox " "&i+1&" ھΪ"&Clng(MyArray(i))
        i=i+1
    EndFor 
EndIf 
//=================================================================================
//Ǹı䴰ڴСΪ(300, 200)
Plugin Window.Size(Hwnd, 300, 200)
MsgBox "ǰı䴰ڴС"
//=================================================================================
//ǴΪ(ǰ)
Plugin Window.Top(Hwnd, 0)
MsgBox "ǰǰ"
//ǴΪ(ȡǰ)
Plugin Window.Top(Hwnd, 1)
MsgBox "ǰȡǰ"
//=================================================================================
//ǹرմ
Plugin Window.Close(Hwnd)
MsgBox "ǰرմ"
