標籤:
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<String> set=ProcessX. getProcessList();
//List<String>lst=
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
atitit.啟用一個視窗總結 swing java .net php