Atitit. Activating a window summarizing swing java. NET PHP

Source: Internet
Author: User

Atitit. Activating a window Summary

1 activation window: Mouse activation vswindows message activation ... 1

1.1 Web framework activation ... 1

2 Exit activation window Hotkey (dbg mode) ... 1

3 Two window activation priority ... 2

4 Web control activates-code. 3

1 activation window: Mouse activation vs Windows message Activation

Use message activation as much as possible in principle:

Winget, Active_id2, ID, Ahk_classsunawtframe

; msgbox%active_id2%

Winactivate, Ahk_class Sunawtframe

1.1 Web Framework Activation

Use message cannot be activated. Controlfocus,internetexplorer_server

Controlfocus,internetexplorer_server1

Had to use mouse to activate. (The mouse key is not suitable for activation, the best in the construction of ...)

Final Robot RB = New Robot ();

clickmidkeymouse(RB, +);

Author:: Old Wow's paw attilax Ayron, email:[email protected]

Reprint please indicate source: Http://blog.csdn.net/attilax

2 Exit Activation Window Hotkey (DBG mode)

#c:: Exitapp:: Win+c

I want to put a loop behind it. Be not a cant exe

3 Two window activation priority

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

public staticvoid 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 (String line : set) {

if(linecontains ("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, +);

} catch (Exceptione) {

e. Printstacktrace ();

         }

      }

   }

Reference

proj . Atibrow

Actplaywin.ahk

Atitit. Activating a window summarizing swing java. NET PHP

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.