AutoHotkey Community

It is currently May 27th, 2012, 9:33 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: August 3rd, 2006, 12:28 pm 
Hi,

I want to know if a script like that exist ?

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

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

Usefull if you have a widescreen !

Thx


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2006, 12:59 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Doesn't look so difficult, all you need is WinMove, a few calculations and context menus and/or hotkeys.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2006, 3:18 pm 
Offline

Joined: June 27th, 2006, 2:38 pm
Posts: 385
Location: Canada
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 4th, 2006, 11:48 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 30th, 2006, 4:37 pm 
Offline

Joined: August 30th, 2006, 4:18 pm
Posts: 7
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

Code:
;________________________________________________________________________
;--------------------
;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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 30th, 2006, 7:13 pm 
Offline

Joined: June 27th, 2006, 2:38 pm
Posts: 385
Location: Canada
You can identify the title of the window using WinGetActiveTitle.

Ex:
Code:
!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
Code:
#!Numpad1::
Msgbox You pressed %A_ThisHotkey%
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 31st, 2006, 12:07 am 
Offline

Joined: August 30th, 2006, 4:18 pm
Posts: 7
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 31st, 2006, 1:24 am 
Offline

Joined: November 17th, 2005, 10:14 pm
Posts: 196
Location: Leicester, UK
Hello JOnGliko

JOnGliko wrote:
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:

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

JOnGliko wrote:
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. :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 31st, 2006, 1:44 pm 
Offline

Joined: August 30th, 2006, 4:18 pm
Posts: 7
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

Code:
;--------------------
;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
}


Last edited by JOnGliko on September 1st, 2006, 9:17 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 31st, 2006, 10:08 pm 
Offline

Joined: June 27th, 2006, 2:38 pm
Posts: 385
Location: Canada
Haha, we all just saved money instead of buying that program u listed!! Gj JOnGliko!!! Like MsgBox said, keep up the good work.
:wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject: 800 x 600
PostPosted: June 11th, 2007, 11:52 am 
Hello.

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

Thanks for answers.


Report this post
Top
  
Reply with quote  
 Post subject: 800 x 600
PostPosted: June 12th, 2007, 10:36 pm 
Hello.

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

Thanks for answers.


Report this post
Top
  
Reply with quote  
 Post subject: Re: 800 x 600
PostPosted: June 13th, 2007, 12:56 am 
Offline
User avatar

Joined: August 30th, 2005, 8:43 pm
Posts: 8667
Location: Salem, MA
djdjdj wrote:
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.

_________________
Image
(Common Answers) - New Tutorials Forum - Humongous FAQ


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 20th, 2007, 6:00 pm 
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


Report this post
Top
  
Reply with quote  
PostPosted: June 20th, 2007, 7:09 pm 
Offline

Joined: November 10th, 2006, 5:10 am
Posts: 110
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 !


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Maestr0, migz99, tomoe_uehara and 75 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group