Atitit. activate a window summary swingjava. netphp atitit. activate a window summary
1. activation window: the mouse activates vswindows message activation... 1
1.1 Web framework activation... 1
2 exit the activation window hotkey (dbg mode)... 1
Three window activation priority... 2
4 Web control activation? Code. 3
1 activation window: Mouse activation vs windows message activation
In principle, use message activation as much as possible ..
WinGet, active_id2, ID, ahk_classSunAwtFrame
; MsgBox % active_id2 %
WinActivate, ahk_class SunAwtFrame
1.1 Web framework activation
Messages cannot be activated .. ControlFocus, InternetExplorer_Server
ControlFocus, InternetExplorer_Server1
You have to use the mouse to activate it .. (The left and right mouse keys are not suitable for activation. it is best to establish activation...
FinalRobot rb =NewRobot ();
ClickMidKeyMouse (rb, 50 );
Author: old Wow's paw Attilax iron, EMAIL: 1466519819@qq.com
2 exit the activation window hotkey (dbg mode)
# C: ExitApp: win + c
The loop to be placed .. Not a cant exe
Three window activation priorities
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 control activation? Code
PublicstaticvoidActiveWin ()ThrowsAWTException {
While(True)
{
Try{
BooleanExistPower =False;
Try{
String playserver = PropX. getConfig (pathx. classPath () + "/cfg. properties", "actsleep ");
IntActsleep = 3000;
Try{
Actsleep = Integer. parseInt (playserver );
}Catch(Exception e ){
//TODO: Handle exception
}
Start: Thread. sleep (actsleep );
}Catch(InterruptedException e ){
//TODOAuto-generated catch block
E. printStackTrace ();
}
List Set = ProcessX. getProcessList ();
// List Lst =
For(String line: 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 ");
FinalRobot rb =NewRobot ();
ClickMidKeyMouse (rb, 50 );
}Catch(Exception e ){
E. printStackTrace ();
}
}
}
Reference
Proj. Atibrow
ActPlayWin. ahk