Welcome Guest.   Make a donation to an author on the site April 24, 2014, 10:00:03 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Your Support Funds this Site: View the Supporter Yearbook.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: WinManagement Snap & AHKSnap !  (Read 16707 times)
Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« on: January 07, 2008, 12:42:27 PM »

Ok, so here's a modified version of jgpaiva's WinManagement AHK script (my first try at a "real" AHK script).  Thmbsup smiley

It doesn't need farr to work and is now a kind of FreeSnap clone... without the undo feature (sorry...) and the incremental resizing (I think that this can already be dealt with properly with Grid move anyways...)... BUT, of  course, with some other features (already existing in WinManagement) : 1-Maximize vertically or horizontally, 2-Toggle On Top/Not On Top, and 3-Maximize/Restore window


Here 'a description of the hotkeys/features (these are mere suggestions : to modify the hotkeys, just modify the script) :


Snap window's borders to edge of the screen :
--------------------------------------------------
WinKey + Up  : snap top window border to screen edge
WinKey + Down : snap bottom window border to screen edge
WinKey + Left : snap left window border to screen edge
WinKey + Right : snap right window border to screen edge


Move window to screen corners :
----------------------------------

WinKey + Home : move window to upper left corner
WinKey + End : move window to bottom left  corner
WinKey + PgUP : move window to upper right corner
WinKey + PgDn  : move window to bottom right corner


Maximize vertically or horizontally :
---------------------------------------

Ctrl + WinKey + Left or Right : Maximize horizontally
Ctrl + WinKey + Up or Down : Maximize vertically


Other common window management :
------------------------------------------

Ctrl + WinKey + PgUP : Maximize/Restore window
Ctrl + WinKey + PgDn : Minimize window
Ctrl + WinKey + Home : Toggle On Top/Not On Top  



Here' the compiled version + the AHK script. To run the uncompiled script, you need to have AHK installed (download it for free).

Edit : 2008 01 07 : new version to better deal with the taskbar.

Edit : 2012 03 20 : completely revamped script by Lanux. See end of thread.

* WinManagement_snap.ahk (3.74 KB - downloaded 537 times.)
* WinManagement_snap.exe (197.17 KB - downloaded 544 times.)
« Last Edit: March 20, 2012, 09:02:07 AM by Armando » Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: January 07, 2008, 12:53:37 PM »

That's pretty cool, armando!
Let's see if we can get ourselves another ahk coder for the family Wink
Logged

tranglos
Supporting Member
**
Posts: 1,079



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: January 07, 2008, 01:46:51 PM »


Maximize vertically or horizontally :
---------------------------------------
Ctrl + WinKey + Left or Right : Maximize horizontally
Ctrl + WinKey + Up or Down : Maximize vertically

Thank you, thank you, thank you! I was just going to post in search of these two behaviors. My wish has been granted before I even asked, how's that for greatness?

WinKey + Down : snap bottom window border to screen edge

One minor bug perhaps: the window snaps to physical bottom of the display, i.e. gets underneath the taskbar (if the taskbar is at bottom).
Logged

jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: January 07, 2008, 01:51:44 PM »

That's because armando is using (in the same manner as i was using in winmanagement) the A_screenheight/a_screenwidth variables, which don't take into account the height of the taskbar.

If you'd like to solve this, armando, see this page, specially:
SysGet, OutputVar, MonitorWorkArea,1

That allows you to get the values of the top,right,bottom and left of the screen on the following variables: OutputVarTop, OutputVarRight, OutputVarBottom and OutputVarLeft.

[edit] added explanation[/edit]
« Last Edit: January 07, 2008, 02:04:49 PM by jgpaiva » Logged

tranglos
Supporting Member
**
Posts: 1,079



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: January 07, 2008, 01:58:49 PM »

I'll try that, thanks a lot!
Logged

tomos
Charter Member
***
Posts: 8,067



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #5 on: January 07, 2008, 02:16:14 PM »

congrats Armando!

is that like gridmove
I mean is that actually a modified version of gridmove?

if so, do the gridmove keys/grids still work too?
Logged

Tom
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: January 07, 2008, 02:18:43 PM »

None, tomos smiley

It's a modified version of the script i used for this farr alias.
Logged

Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #7 on: January 07, 2008, 05:12:13 PM »

Thanks everyone! I just came back.

That's because armando is using (in the same manner as i was using in winmanagement) the A_screenheight/a_screenwidth variables, which don't take into account the height of the taskbar.

Exactly  embarassed


If you'd like to solve this, armando, see this page, specially:
SysGet, OutputVar, MonitorWorkArea,1

That allows you to get the values of the top,right,bottom and left of the screen on the following variables: OutputVarTop, OutputVarRight, OutputVarBottom and OutputVarLeft.

[edit] added explanation[/edit]

Thanks jgpaiva ! I shall take a look at that and try to understand... later tonight when I have 5 more minutes! smiley

Of course, it would be easy to add many many more features (like scrolling up/down a window -- although that might be a bit tricky for me at that point)... Anybody can modify the script anyways, but if there are other suggestions, I can try...
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #8 on: January 07, 2008, 07:24:13 PM »

OK, I made the modifications. it should now work whether the taskbar is visible or not, and wherever it's positioned on the screen. Try it and tell me if it works as expected.  smiley

(Update the files in my first post)
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
tranglos
Supporting Member
**
Posts: 1,079



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: January 08, 2008, 08:42:22 PM »

Works great now, thank you!
Logged

lanux128
Global Moderator
*****
Posts: 6,048



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: January 08, 2008, 09:27:56 PM »

how did i miss this? great work, Armando.. Thmbsup going to d/l & try this..
Logged

Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #11 on: January 08, 2008, 09:58:57 PM »

Thanks guys.
It's not much, really.  embarassed
It's basically freesnap + WinManagement (by jgpaiva)... Without the "Undo" feature.
But it was fun to "rewrite", yesterday, to take the taskbar in consideration.  smiley
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
lanux128
Global Moderator
*****
Posts: 6,048



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #12 on: January 08, 2008, 10:12:55 PM »

But it was fun to "rewrite", yesterday, to take the taskbar in consideration.

that's the magic of DC - it makes coders out of users! smiley hmm.. now that sounds like a tag-line..
Logged

Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #13 on: January 08, 2008, 10:31:55 PM »

Ahah! Yes, it probably does (make, ahem, "coders" out of users).
I think that I always wanted to "code"...
I Hope I'll have more time to learn.
Maybe I'll do like superboyac and learn a bit of C/C++.  smiley
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
Ampa
Charter Member
***
Posts: 589


I am cute ;)

View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: January 09, 2008, 06:59:50 AM »

Congratulations on your first AHK util.

The funtionality seems very similar to another AHK script that I use... WindowPad. Not a critisism, just an observation!

How does your script differ? What other features (if any) do you think you might add?

Ampa
Logged
Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #15 on: January 09, 2008, 07:05:57 PM »

Hi Ampa! Thanks for bringing this to my attention.  smiley Looks like a fun script.
Actually, this was just a tiny little exercise for me... The script you're referring to is more elaborate and its features are a bit different since it supports multiple-monitor. WinManagement Snap! (based on jgpaiva's WinManagement and Blue Onion Software's FreeSnap) is mostly to quickly change windows size and shape; so it's main point is to resize a window in the direction you choose, up to the screen border. It also other things, like indicated in the first post of this thread.

Looking at the WindowPad's features, we see that it doesn't exactly do the same thing -- it's more "zone" oriented, like GridMove.

Quote
;   Move and resize windows with Win+Numpad.
;     Win+Numpad1 = Fill bottom-left quarter of screen
;     Win+Numpad2 = Fill bottom half of screen
;     etc.
;
;   Move windows across monitors. For example:
;     Win+Numpad4 places the window on the left half of the screen.
;     Win+Numpad4 again moves it to the monitor to the right.
;
;   Quick monitor switch:
;     Win+Numpad5 places the window in the center of the screen.
;     Win+Numpad5 again moves the window to the next monitor.
;     (This works by monitor number, not necessarily left to right.)
;
;   QUICKER Monitor Switch:
;     Win+NumpadDot switches to the next monitor (1->2->3->1 etc.)
;     Win+NumpadDiv moves ALL windows to monitor 2.
;     Win+NumpadMult moves ALL windows to monitor 1.
;
;   Other shortcuts:
;     Win+Numpad0 toggles maximize.
;     Insert (or some other key) can be used in place of "Win".
;
; Credits:
;   Concept based on HiRes Screen Splitter by JOnGliko.
;   Written from scratch by Lexikos to support multiple monitors.
;   NumpadDot key functionality suggested by bobbo.
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
jgpaiva
Global Moderator
*****
Posts: 4,710



Artificial Idiocy

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: January 09, 2008, 07:19:45 PM »

Cool, WindowPad has some interesting features! smiley
Logged

lanux128
Global Moderator
*****
Posts: 6,048



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: January 09, 2008, 08:13:31 PM »

good find, Ampa but it does look a bit elaborate.. smiley
Logged

Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #18 on: January 09, 2008, 09:00:09 PM »

What other features (if any) do you think you might add?

I forgot to answer that question...
In terms of features, I didn't really think of any others for now, but if some have suggestions, who knows.  smiley
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
Nxqd3051990
Participant
*
Posts: 78

Train to become GTD Master

View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: March 26, 2008, 06:19:55 AM »

Aha, cool program  Thmbsup
Logged

KEEP IT SIMPLE !
Hardware ASUS K8N |AMD 2800+@2,6 with WC| Ram Kingmax 512@235 2-4-4-11
Software   Firefox 2.0.0.5 | XYplorer | Foobar 0.9.4.2 | VLC | AutoHotkey | SciTe | Pidgin
Sites Y!Blog | Facebook | Tumblog | Last.fm
Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #20 on: March 26, 2008, 09:06:52 PM »

Thanks!  smiley
Really, it's nothing. I played with jgpaiva's script (that he made for a farr plugin) and added a few little things from Blue Onion Software's FreeSnap... If you look at the script, you'll probably also find that's not hard to modify to your liking.
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
lanux128
Global Moderator
*****
Posts: 6,048



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #21 on: March 19, 2012, 08:35:28 PM »

NECRO THREAD ALERT

i had modified the original WinManagement Snap script to add/remove a few things, such as:
added
snap undo, center windows (win+numpad5) and incremental resizing (win+numpad plus/minus)

removed
resize vertically or horizontally,  max/min window, and toggle on top feature.

so with Armando's permission, here is the modified script (ahk+exe), feel free to modify it for your own purposes.

note: to add/remove resolutions for the incremental resizing feature, you may need to edit AhkSnap.ini.

Quote from: AhkSnap.ini
[Size]
;variables here
size1= 320,240
size2= 640,480
size3= 800,600
size4= 1024,768
size5= 1152,864
size6= 1280,600
size7= 1280,720
size8= 1280,768
size9= 1280,800
size10= 1360,768
size11= 1440,900


* AhkSnap.zip (298.9 KB - downloaded 60 times.)
Logged

Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #22 on: March 19, 2012, 10:13:20 PM »

 Thmbsup
Cool ! I like it. Much, much better and sophisticated. It's a completely new script.

Of course, as I told you, that was my first baby step into the scripting/programming world... Didn't know anything at the time. I still feel like I know nothing, but that's another story.  Grin

The exe works perfectly.

The AHK file gives me an error : "IniRead" requires at least 4 parameters. I quickly added "size9" as the last argument. Not sure that this is the best way though -- just did what seemed obvious without too much thinking. (The reason I'm trying the AHK file is that I usually append all the little scripts together in a bigger script... less processes to manage).
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
lanux128
Global Moderator
*****
Posts: 6,048



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #23 on: March 19, 2012, 10:24:37 PM »

The AHK file gives me an error : "IniRead" requires at least 4 parameters. I quickly added "size9" as the last argument. Not sure that this is the best way though --

sorry about that, Armando. i forgot to mention that the newer script uses AutoHotkey_L (a custom build of AutoHotkey). AHK_L's IniRead command is slightly different, that's why you're getting that error. smiley

You can learn more about AHK_L, here.
Logged

Armando
Charter Member
***
Posts: 2,666



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #24 on: March 20, 2012, 08:59:43 AM »

Interesting. I just installed it but am having problems with various scripts. Will revert to the plain AHK for now and will check later.
(Of course, the compiled version of AHKSnap isn't affected at all -- just saying this for others reading following the thread !)
Thanks Lanux.


(EDIT : BTW Lanux, if you want to create a new thread -- or split this one -- for AHKSnap, you can... It's different enough to justify it. It's really up to you.  smiley )
« Last Edit: March 20, 2012, 09:05:09 AM by Armando » Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.056s | Server load: 0.07 ]