|
楼主 |
发表于 2013-6-21 18:14:05
|
显示全部楼层
import winex;
import process;
import fsys.lnk;
var exepath = "D:\Program Files\Tencent\QQ\bin\QQ.exe";
var setpath = fsys.lnk.search( "QQ\.exe" )
if( setpath){
exepath = setpath;
}
if( ! process.find(exepath) )
process.execute(exepath)
//等待指定的窗口
窗口句柄, ,线程ID,进程ID = winex.wait( "QQ\d+",,"TXGuiFoundation", )
//查找指定的窗口
窗口句柄, ,线程ID,进程ID = winex.findExists( "QQ\d+",,"TXGuiFoundation", )
//查找指定的窗口并激活
窗口句柄, ,线程ID,进程ID = winex.findActivate( "QQ\d+",,"TXGuiFoundation", )
//等待指定的窗口打开到激活状态
窗口句柄, ,线程ID,进程ID = winex.waitActive( "QQ\d+",,"TXGuiFoundation", )
//查找指定的主窗口
窗口句柄,线程ID,进程ID = winex.find("TXGuiFoundation","QQ\d+" )
//关闭窗口
winex.close(窗口句柄)
//退出窗口程序
winex.quit(窗口句柄)
//修改标题
winex.setText(窗口句柄,"我是新的标题");
//最小化
win.show(窗口句柄,0x6/*_SW_MINIMIZE*/)
//调用API闪烁窗口
FlashWindow = ::User32.api("FlashWindow", "int(int hwndTarget, int bInvert)")
FlashWindow(窗口句柄, 0);
|
|