Atitit. activate a window to summarize swingjava. netphp

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.