zendevelop

learn & share

用Hwnd来标识窗口

using run notepad as an example:

1::
Run notepad, , ,thisPID
WinWait ahk_pid 
%thisPID%
WinGet thisHwnd, ID, ahk_pid 
%thisPID%
WinActivate ahk_id 
%thisHwnd%
WinWaitActive ahk_id 
%thisHwnd%
Sleep 
2000
WinClose ahk_id 
%thisHwnd%
WinWaitClose ahk_id 
%thisHwnd%

 

posted on 2008-08-26 20:46  zendevelop  阅读(207)  评论(0编辑  收藏  举报

导航