[General]
Description=ʾӣȡϢ
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=.
˵.
ýűҵǰڵӴ壬ťǩͼбȣЩӴĴھϢ浽c̸Ŀ¼µlog.txtļС.
.
ϸ˵.
ýűҪ˵¹ܣ.
1ıļĶд.
2Windowĵʾ.
3δһַУضĸʽֽҪݡSplitʹ.
4Ԫصʹ÷.
5ѭʹá.
4εRunAppʹã.
.
߽ܡ.
ahfxman.
.
ڡ.
20069.
.

[Script]
//ȶһϰ
dim handle,handle1, s,s1,s2,s3, MyArray,parentH, fileHandle
set TiShiObj = createobject("WScript.Shell")
//===================  ======================
//һļΪ
fileHandle ="c:\log.txt"
//ӳ
Gosub Ҵ
//ñʼǱ򿪸ղűļ
VBSCall RunApp(fileHandle)
Rem 
//Ի,ʾ
Call TiShiObj.Popup("ֹ",3,"3󴰿Զر",0)
//msgbox "ֹ",64,"ֹ"
//
EndScript 
//================== ӳ ========================
Sub Ҵ
    //ȡǰڵľ
    Plugin parentH = Window.Foreground()
    //ǰ޴,
    If parentH = 0
        VBSCall MessageBox("ûҵڣ")
        Goto 
    EndIf 
    //ʼ
    handle=1
    handle1=0
    //һֱѭҵӴ,ֱҲΪֹ
    While handle<>0
        //ҵǰڵӴ
        Plugin handle = Window.FindEx(parentH, handle1,0,0)
        //ҵӴ
        If handle <> 0
            //ȡӴڵϢ, GetClientRect صϢһַ, ʽ:123|356|200|400
            Plugin s = Window.GetClientRect(handle)
            //|ַзָ, 浽
            //Splitзָ, MyArrayе:
            // MyArray(0) = 123  <---ڵ
            // MyArray(1) = 356  <---ڵϱ
            // MyArray(2) = 200  <---ڵĿ
            // MyArray(3) = 400  <---ڵĸ߶
            //ע: ĵһԪ, ȡʱ MyArray(0),   MyArray(1)
            //Ԫص±Ǵ 0 ʼ, Ǵ 1 ʼ
            MyArray = Split(s, "|", -1, 1)
            // & ַ, 
            s = "(x,y)" & MyArray(0) & "," & MyArray(1) & " ȣ߶ȣ" & MyArray(2) & "," & MyArray(3)
            //ȡڵ
            Plugin s1 = Window.GetClass(handle)
            s1 = ": " & s1
            //ȡڵı
            Plugin s2 = Window.GetText(handle)
            s2 = ",⣺" & s2
            s3 = "  " & CStr(handle)
            //ĸϢдļ,c:\log.txt
            If fileHandle <> -1
                Plugin File.WriteFileEx(fileHandle, s1 & s2 & s & s3)
            EndIf 
        EndIf 
        //handle1ֵ,Ա֤ѭ
        handle1 = handle
    EndWhile 
Return Ҵ
