io.open();//打开控制台
import winex;
import process
//运行记事本
process.execute( "notepad.exe")
//查找标题包含"记事本",并包含类名为"Edit"控件的窗口.
窗口句柄,控件句柄,线程ID,进程ID = winex.wait("|<记事本>","", ,"Edit")
//显示结果
io.print( 窗口句柄,控件句柄,线程ID,进程ID )
io.print("请关闭打开的记事本窗口")
winex.waitClose("|<记事本>","", ,"Edit");
..io.print("窗口关闭了")
execute("pause") //按任意键继续
io.close();//关闭控制台
阅读(1291) | 评论(0) | 转发(0) |