2017-04-18 3 views

Antwort

2
SetWinDelay -1 

^1:: Area1() 
^2:: Area2() 
^3:: Area3() 
^4:: Area4() 
^5:: Area5() 
^6:: Area6() 

^7:: 
i := "" ; number of windows 
WinGet, id, list,,, Program Manager 
Loop, %id% 
{ 
    this_ID := id%A_Index% 
    WinGet, exStyle, exStyle, ahk_id %this_ID% 
    If !(exStyle & 0x100) 
     continue 
    WinGetTitle, title, ahk_id %this_ID% 
    If (title = "") 
     continue 
    i++ 
    WinActivate, ahk_id %this_ID% 
     Area%i%() 
} 
return 

; Top_Left 
Area1(){ 
    WinRestore, A 
    WinMove, A, , 0, 0,(A_ScreenWidth/3),(A_ScreenHeight/2) 
} 

; Top_Middle 
Area2(){ 
    WinRestore, A 
    WinMove, A, , (A_ScreenWidth/3), 0,(A_ScreenWidth/3),(A_ScreenHeight/2) 
} 

; Top_Right 
Area3(){ 
    WinRestore, A 
    WinMove, A, , (2*A_ScreenWidth/3), 0,(A_ScreenWidth/3),(A_ScreenHeight/2) 
} 

; Bottom_Left 
Area4(){ 
    WinRestore, A 
    WinMove, A, , 0, (A_ScreenHeight/2),(A_ScreenWidth/3),(A_ScreenHeight/2) 
} 

; Bottom_Middle 
Area5(){ 
    WinRestore, A 
    WinMove, A, , (A_ScreenWidth/3), (A_ScreenHeight/2),(A_ScreenWidth/3),(A_ScreenHeight/2) 
} 

; Bottom_Right 
Area6(){ 
    WinRestore, A 
    WinMove, A, , (2*A_ScreenWidth/3), (A_ScreenHeight/2),(A_ScreenWidth/3),(A_ScreenHeight/2) 
} 
+0

Vielen Dank für das Drehbuch zu geben! Jetzt bin ich produktiver. –