[按键精灵] 纯文本查看 复制代码
//下面这句是按查找方式(模糊),遍历符合窗口类名(0)且标题("记事本")的句柄,保存到数组(HwndEx)里
HwndEx = Plugin.Window.SearchEx(0,"记事本",0)
MsgBox "查找到符合的窗口句柄为:"& HwndEx
//下面这句用于分割字符串,将获得的句柄组分割
dim MyArray
MyArray = Split(HwndEx, "|")
If UBound(MyArray)>=0 Then
i=0
For UBound(MyArray)
//下面这句将字符串转换成数值
Msgbox "第 "& i+1 & " 个窗口句柄为:"& Clng(MyArray(i))
i=i+1
Next
End If