AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

HiRes Screen Splitter - Split your sreen like dual monitors
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
holomind



Joined: 11 Mar 2006
Posts: 300
Location: Munich, Germany

PostPosted: Mon Oct 09, 2006 10:15 am    Post subject: Reply with quote

@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
View user's profile Send private message Visit poster's website
matula



Joined: 07 Mar 2008
Posts: 1

PostPosted: Fri Mar 07, 2008 8:24 pm    Post subject: funny Reply with quote

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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group