Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Split desktop - Split view


  • Please log in to reply
18 replies to this topic
JOnGliko
  • Guests
  • Last active:
  • Joined: --
Hi,

I want to know if a script like that exist ?

http://www.splitview...screenshots.htm

It allow you to split two fullscreen windows on one desktop.

Usefull if you have a widescreen !

Thx

polyethene
  • Members
  • 5519 posts
  • Last active: May 17 2015 06:39 AM
  • Joined: 26 Oct 2012
Doesn't look so difficult, all you need is WinMove, a few calculations and context menus and/or hotkeys.

autohotkey.com/net Site Manager

 

Contact me by email (polyethene at autohotkey.net) or message tidbit


Conquer
  • Members
  • 385 posts
  • Last active: Jan 10 2013 02:14 AM
  • Joined: 27 Jun 2006
A script version of apple's expose by Keyboardfreak can be found here

It makes all your active windows fit onto your screen when you press Ctrl. I think its possible to modify the script. Default hotkey is RControl

JOnGliko
  • Guests
  • Last active:
  • Joined: --
Thx Titan. I'll try to do the script for myself., it was just in case it already exist. Thx Conquer for the script example.

JOnGliko
  • Members
  • 7 posts
  • Last active: Aug 28 2007 06:08 PM
  • Joined: 30 Aug 2006
Ok I have made the script.
I think it's not the better way... but it work ... ;)

I want now to add a feature to move the next window after the active one. How can I identify that window ?

And I can't figure out how to make a three keys hotkey ? (like LAlt & LWin & numpad1) ?

Thx for the help

;________________________________________________________________________
;--------------------
;HiRes Screen Splitter
;--------------------
;
;Split the screen in areas
;Really usefull for HiRes Monitor, make it look like dual monitor !
;
;Hotkey --> WinKey + Arrow direction && WinKey + Numpad 1 2 3 4 5 6 7 8 9
;________________________________________________________________________

#Numpad4::                        
#Left:: ;put the window in the left part of the screen
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,0,0,A_ScreenWidth/2,A_ScreenHeight-TrayHeight
return

#Numpad6::
#Right:: ;put the window in the right part of the screen 
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,A_ScreenWidth/2,0,A_ScreenWidth/2,A_ScreenHeight-TrayHeight
return

#Numpad8::
#Up:: ;put the window in the top of the screen 
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,0,0,A_ScreenWidth,A_ScreenHeight/2-TrayHeight/2
return

#Numpad2::
#Down:: ;put the window in the bottom of the screen 
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,0,A_ScreenHeight/2-TrayHeight/2,A_ScreenWidth,A_ScreenHeight/2-TrayHeight/2
return

#Numpad5:: ;Maximize
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,0,0,A_ScreenWidth,A_ScreenHeight-TrayHeight/2
return        

#Numpad7:: ;put the window in the upper left corner
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,0,0,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2
return

#Numpad9:: ;put the window in the upper right corner
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,A_ScreenWidth/2,0,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2
return 

#Numpad3:: ;put the window in the bottom right corner
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2
return

#Numpad1:: ;put the window in the bottom left corner
  WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
  WinMove,A,,0,A_ScreenHeight/2-TrayHeight/2,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2
return


Conquer
  • Members
  • 385 posts
  • Last active: Jan 10 2013 02:14 AM
  • Joined: 27 Jun 2006
You can identify the title of the window using WinGetActiveTitle.

Ex:
!1::       ;Alt+1 Hotkey
WinGetActiveTitle, TitleString ; Retrieves title into the variable 'TitleString'
Msgbox %TitleString% ; Tell the user what the windows name is in a msg box
return

Edit:
Oh, and as for the 3 key hotkey, I have no clue how to make it with specific keys, however it is possible to make it simply AnyWindowsKey+AnyAltKey+Num1
#!Numpad1::
Msgbox You pressed %A_ThisHotkey%
return


JOnGliko
  • Members
  • 7 posts
  • Last active: Aug 28 2007 06:08 PM
  • Joined: 30 Aug 2006
Thx Conquer for you answers.

For the three hotkey solution, no problems. But for your example of the active windows...I don't want the active window but the window just after (the window just under the active one).

I think I have to make a list of all active windows and loop for the previous one.

Thx for your help

MsgBox
  • Members
  • 204 posts
  • Last active: Jan 05 2011 01:40 AM
  • Joined: 17 Nov 2005
Hello JOnGliko

Ok I have made the script.
I think it's not the better way... but it work ...

JOnGliko I really like your script and if you carry on developing it or not, I am going to steal it and start using it right away. :lol:

I want now to add a feature to move the next window after the active one. How can I identify that window ?

I don't want the active window but the window just after (the window just under the active one).

Do you need to identify it? Can't you just AltTab? Or am I misunderstanding you?

I have a suggestion/request, could you make NumPad5 place the window in the center of the screen and maybe Ctrl-Win Up/Down minimise and maximise?

I think also that you should put your script in the Scripts & Functions section so that it doesn't get lost here.

Keep up the good work. :)

JOnGliko
  • Members
  • 7 posts
  • Last active: Aug 28 2007 06:08 PM
  • Joined: 30 Aug 2006
Ok I have found how to swap with the previous window, and I have improve a little the script. Now when you press Winkey + Alt it modify the window just after the active one. I think it's really usefull (you economize a Alt+Tab MsgBox)

And two hit on the Up arrow will Maximize the active window (as the numpad 0) and two hit and down arrow will minimize

And now numpad 5 put the window in the middle (thx MsgBox)

I'll post it on the script section

;-------------------- 
;HiRes Screen Splitter -- by JOnGliko 
;-------------------- 
; 
;Split the screen in areas 
;Really usefull for HiRes Monitor, make it look like dual monitor ! 
; 
; 
;Hotkey for the ACTIVE window--> WinKey + Arrow direction && WinKey + Numpad 1 2 3 4 5 6 7 8 9 
;Hotkey for the window under the ACTIVE window--> WinKey + Alt + Arrow direction && WinKey + Alt Numpad 1 2 3 4 5 6 7 8 9 
;Special Hotkey --> Two Time on the Up arrow maximize the active window (num 0 on the pad do the same) 
;Special Hotkey --> Two Time on the down arrow minimize the active window 
;_______________________________________________________________________ 


#Left:: 
#Numpad4:: ;put the Active window in the left part of the screen 
   ToLeft() 
Return 

#!Left:: 
#!Numpad4:: 
   Send, !{esc} 
   ToLeft() 
   Send, !+{esc} 
Return    
    
#Right:: 
#Numpad6::  ;put the Active window in the right part of the screen 
  ToRight() 
Return 

#!Right:: 
#!Numpad6:: 
   Send, !{esc} 
   ToRight() 
   Send, !+{esc} 
Return 

#Up:: 
#Numpad8:: 
if (A_PriorHotkey <> "#Up" or A_TimeSincePriorHotkey > 400) 
{ 
   KeyWait, Up 
   ToUp() ; One time key press put the Active window to top 
   return 
} 
   ToMaxi() ; Two time key press maximize the active window 
Return 

#!Numpad8:: 
#!Up:: 
   Send, !{esc} 
   ToUp() 
   Send, !+{esc} 
Return 

#Down:: 
#Numpad2:: 
if (A_PriorHotkey <> "#Down" or A_TimeSincePriorHotkey > 400) 
{ 
   KeyWait, Down 
   ToBottom()  ; One time key press put the window on the bottom 
   return 
} 
   WinMinimize, A ; Two time key press minimize the active window 
Return 

#!Down:: 
#!Numpad2:: 
   Send, !{esc} 
   ToBottom() 
   Send, !+{esc} 
Return 

#Numpad0:: ;Maximize 
   ToMaxi() 
Return        

#Numpad7:: ;put the Active window in the upper left corner 
   ToUpperLeft() 
Return 

#!Numpad7:: ;put the window in the upper left corner 
   Send, !{esc} 
   ToUpperLeft() 
   Send, !+{esc} 
Return 

#Numpad9:: ;put the Active window in the upper right corner 
   ToUpperRight() 
Return 

#!Numpad9:: ;put the window in the upper right corner 
   Send, !{esc} 
   ToUpperRight() 
   Send, !+{esc} 
Return 

#Numpad3:: ;put the Active window in the bottom right corner 
   ToBottomRight() 
Return 

#!Numpad3:: ;put the window in the bottom right corner 
   Send, !{esc} 
   ToBottomRight() 
   Send, !+{esc} 
Return 

#Numpad1:: ;put the Active window in the bottom left corner 
   ToBottomLeft() 
Return 

#!Numpad1:: ;put the window in the bottom left corner 
   Send, !{esc} 
   ToBottomLeft() 
   Send, !+{esc} 
Return 

#Numpad5:: ;Center the Active window 
   ToMiddle() 
Return 

#!Numpad5:: ;Center the window 
   Send, !{esc} 
   ToMiddle() 
   Send, !+{esc} 
Return 

ToUp() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,0,0,A_ScreenWidth,A_ScreenHeight/2-TrayHeight/2 
   Return 
} 
ToBottom() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,0,A_ScreenHeight/2-TrayHeight/2,A_ScreenWidth,A_ScreenHeight/2-TrayHeight/2 
   Return 
} 
ToLeft() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,0,0,A_ScreenWidth/2,A_ScreenHeight-TrayHeight 
   Return 
} 
ToRight() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,A_ScreenWidth/2,0,A_ScreenWidth/2,A_ScreenHeight-TrayHeight 
   Return 
} 
ToMaxi() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,0,0,A_ScreenWidth,A_ScreenHeight-TrayHeight 
   Return 
} 
ToMiddle() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,A_ScreenWidth/4,0,A_ScreenWidth/2,A_ScreenHeight-TrayHeight 
   Return 
} 
ToUpperLeft() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,0,0,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2 
   Return 
} 
ToUpperRight() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,A_ScreenWidth/2,0,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2 
   Return 
} 
ToBottomLeft() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,0,A_ScreenHeight/2-TrayHeight/2,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2 
} 
ToBottomRight() 
{ 
   WinGetPos,,,,TrayHeight,ahk_class Shell_TrayWnd,,, 
   WinMove,A,,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2,A_ScreenWidth/2,A_ScreenHeight/2-TrayHeight/2 
}


Conquer
  • Members
  • 385 posts
  • Last active: Jan 10 2013 02:14 AM
  • Joined: 27 Jun 2006
Haha, we all just saved money instead of buying that program u listed!! Gj JOnGliko!!! Like MsgBox said, keep up the good work.
:wink:

djdjdj
  • Guests
  • Last active:
  • Joined: --
Hello.

How can I creat a HotKey that rezises the Window to exactly 800 x 600 px?

Thanks for answers.

djdjdj
  • Guests
  • Last active:
  • Joined: --
Hello.

How can I creat a HotKey that rezises the Window to exactly 800 x 600 px?

Thanks for answers.

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005

Hello.

How can I creat a HotKey that rezises the Window to exactly 800 x 600 px?

Thanks for answers.


Generally, you should start a new topic when you have a new question.

The Winmove command can make a window the size you want.

Steneub
  • Guests
  • Last active:
  • Joined: --
This is a great script! Thanks JOnGliko!

I have a new widescreen and I like the extra space it provides, but sometimes I want to lock things down to the ol' 1280 width with a nice gutter for other things.

And engunneer, thanks for the headsup on the Winmove command. That made customizing the script super-easy

drmurdoch
  • Members
  • 120 posts
  • Last active: Aug 05 2015 03:27 PM
  • Joined: 10 Nov 2006
Neat script !
I demo'd Split View Last month but was unhappy with it.

I still prefer dual screens for my work.

Dual Screens + UltraMon is the way to go for me !

This script (I called it HiRes.Screen.Splitter.ahk) is not dual screen friendly.

What happens is that it assumes all Windows are on one screen such that when your active window is on Screen 2, and you press Windows Key + 4, it moves the Window to Screen 1 and puts it on the Left half of the screen. (The incompatibility is that it moves it to screen 1).

[ screen 1 ] [ screen 2 ]

Otherwise Very COOL !