4 Web控件激活—code
atitit.激活一个窗口总结
1 激活窗口:鼠标激活vswindows消息激活... 1
1.1 Web框架激活... 1
2 退出激活窗口热键(dbg模式)... 1
3 俩个窗口激活优先级... 2
4 Web控件激活—code. 3
1 激活窗口:鼠标激活vs windows消息激活
原则上尽可能的使用消息激活。。
WinGet, active_id2, ID, ahk_classSunAwtFrame
;MsgBox%active_id2%
WinActivate, ahk_class SunAwtFrame
1.1 Web框架激活
使用消息不能激活 。。ControlFocus,InternetExplorer_Server
ControlFocus,InternetExplorer_Server1
只好使用鼠标激活。。(鼠标左右键均不适合激活用,中建激活最好了。。。
final Robotrb = new Robot();
clickMidKeyMouse(rb,50);
作者:: 老哇的爪子 Attilax 艾龙, EMAIL:[email protected]
转载请注明来源: http://blog.csdn.net/attilax
2 退出激活窗口热键(dbg模式)
#c:: ExitApp ::win+c
要放的个loop 后面了。。被而不个cant exe
3 俩个窗口激活优先级
DetectHiddenWindows, On
Loop
{
;class PowerDVD14
;PowerDVD
;ahk_classPowerDVD14
WinGet,active_id, ID, PowerDVD,,Everything,Everything
WinActivate,ahk_classPowerDVD14
WinMaximize,ahk_classPowerDVD14
;;,,Everything,Everything
;MsgBox aa
IfWinNotExist,ahk_class PowerDVD14
{
WinGet,active_id2, ID, ahk_class SunAwtFrame
;MsgBox%active_id2%
WinActivate, ahk_class SunAwtFrame
ControlFocus,InternetExplorer_Server
ControlFocus,InternetExplorer_Server1
}
;msgbox tt
Sleep, 3000
}
#c:: ExitApp
4 Web控件激活—code
publicstaticvoid activeWin()throws AWTException {
while(true)
{
try {
booleanexistPower=false;
try {
String playserver=PropX.getConfig(pathx.classPath()+"/cfg.properties","actsleep");
intactsleep=3000;
try {
actsleep=Integer.parseInt(playserver);
} catch (Exceptione) {
//TODO: handle exception
}
start: Thread.sleep(actsleep);
} catch (InterruptedExceptione) {
//TODO Auto-generated catch block
e.printStackTrace();
}
List
//List
for (Stringline : set) {
if(line.contains("PowerDVD.exe") || line.contains("PowerDVDMovie"))
{
System.out.println("exist dvd ");
existPower=true;
break ;
}
}
if(existPower) // if sexist power dvd ,,b actselect win..
continue;
System.out.println("---no exist dvd");
final Robotrb = new Robot();
clickMidKeyMouse(rb,50);
} catch (Exceptione) {
e.printStackTrace();
}
}
}
参考
proj。atibrow
actPlayWin.ahk
相关文章
相关视频