 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
holomind
Joined: 11 Mar 2006 Posts: 300 Location: Munich, Germany
|
Posted: Mon Oct 09, 2006 10:15 am Post subject: |
|
|
@lazlo: this workarea detection is more stable
but is not tested on dualmonitor systems. but it alwyas correctly finds my taskbar (either locked or not), i use my taskbar on right side.
| Code: |
DetectScreen:
WinGetPos,Tx,Ty,Tw,Th,ahk_class Shell_TrayWnd,,,
Sw := A_ScreenWidth
Sh := A_ScreenHeight
; Define Work-Area (adjust Taskbar position)
Wy := ( Tw > Th and Tx = 0 and Ty = 0) * Th
Wx := ( Tw < Th and Tx = 0 and Ty = 0) * Tw
Wh := Sh - ( Tw > Th ) * Th
Ww := Sw - ( Tw < Th ) * Tw
Return
|
|
|
| Back to top |
|
 |
matula
Joined: 07 Mar 2008 Posts: 1
|
Posted: Fri Mar 07, 2008 8:24 pm Post subject: funny |
|
|
this is exactly what i'm using, except i don't ever change the width just height and position, and i pass some pixels off screen, so the borders go out.
something like:
| Code: |
#Persistent
#SingleInstance
SetTimer, IdleTimerCheck, 10000
IdleTimerCheck:
SysGet, Mon1, MonitorWorkarea
winSnapHeightPerTwo = %Mon1Bottom%
winSnapHeightPerTwo //= 2
winSnapHeightPerTwo+=3
return
#Numpad4::
SysGet, Mon1, MonitorWorkarea
winSnapHeight = %Mon1Bottom%
winSnapHeight+=6 ;12 mplayer
WinMove, A, , -5, -3, , winSnapHeight ;-15,-8 mplayer
return
#Numpad6::
SysGet, Mon1, MonitorWorkarea
winSnapHeight = %Mon1Bottom%
winSnapHeight+=6
WinGetPos , , , winWidth, , A
winFinalpos = %Mon1Right%
winFinalpos-=%winWidth%
WinMove, A, , winFinalpos, -3, , winSnapHeight
return
#Numpad2::
SysGet, Mon1, MonitorWorkarea
;MsgBox, Left: %Mon1Left% -- Top: %Mon1Top% -- Right: %Mon1Right% -- Bottom %Mon1Bottom%
WinMove, A, , , winSnapHeightPerTwo-3, , winSnapHeightPerTwo
return
#Numpad8::
SysGet, Mon1, MonitorWorkarea
;MsgBox, Left: %Mon1Left% -- Top: %Mon1Top% -- Right: %Mon1Right% -- Bottom %Mon1Bottom%
WinMove, A, , , -3, , winSnapHeightPerTwo
return
ExitSub:
{
}
ExitApp
|
it makes more sense to me. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|