Welcome Guest.   Make a donation to an author on the site October 24, 2014, 05:24:27 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.
 
The N.A.N.Y. Challenge 2013! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: MiniMe (aka MaxiMe)  (Read 18427 times)
justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« on: February 01, 2008, 05:09:31 AM »

I needed this quickly so whipped up this AHK script to quickly minimize or maximize windows using right shift and control. I got really frustrated with the fact there is no windows shortcut to minimize the active window. If you're like me and have many window open then consider using minimIZE to minimize windows to a small desktop thumbnail (and out of your taskbar). In combination with that, this script can make windows management a lot less painlessful.

MiniMe - latest version 4 - February 1,  2008
minimize the current window when pressing right shift twice quickly. maximize the current window when pressing right control twice quickly
v4 - permanently fixed key hold issue
v3 - added jgpaiva's key repeat fix
v2 - changed hotkeys to avoid sending keys

[copy or print]
; minimize the current window when pressing right control twice quickly
; maximize the current window when pressing right shift twice quickly
#NoEnv
SendMode Input
#NoTrayIcon
Delay = 250

~RControl up::
If (A_PriorHotkey = A_ThisHotkey and A_TimeSincePriorHotkey < Delay)
WinMinimize, A
Return
~RShift up::
If (A_PriorHotkey = A_ThisHotkey and A_TimeSincePriorHotkey < Delay)
WinMaximize, A
Return

* minime.ahk (0.41 KB - downloaded 328 times.)
* Minime.zip (194.13 KB - downloaded 466 times.)
« Last Edit: January 28, 2009, 03:09:04 AM by justice » 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 #1 on: February 01, 2008, 05:30:19 AM »

Very interesting idea, justice!!

I never though of using this kind of repetitive hotkeys to make shortcuts.

I prefer my win+x to maximize/restore windows, though, essencially because with the scheme you chose, pgup/pgdown gets sent to the current window.
I think i'll adapt your script to work with right shift for myself smiley
Logged

justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: February 01, 2008, 05:37:03 AM »

Ah actually I'm sure I can prevent the keys to be sent to the current window ... opening helpfile..
Yeah you can but then I have to send pagedown/up afterwards which proved a hassle,
so I changed the hotkeys as follows:

2x right control = minimize
2x right shift = maximize
« Last Edit: February 01, 2008, 05:59:47 AM by justice » 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: February 01, 2008, 05:50:15 AM »

You can, justice.. But that'd mean you'd have to add a delay to the regular use of pageup/down (because during that time, you'd have to be waiting for the next press of pgdown), thus, the solution is really worse than the problem Wink
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 #4 on: February 01, 2008, 05:53:58 AM »

Ok, i just found a small bug. If you keep the key pressed, the keyboard auto-repeat will activate the maximize function. Not good, specially when use shift as hotkey!

jgpaiva opens ahk's help file tongue
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 #5 on: February 01, 2008, 05:57:39 AM »

Ok, fixed that problem.
[copy or print]
; minimize the current window when pressing pagedown twice quickly
; maximize the current window when pressing pageup twice quickly
#NoEnv
SendMode Input
SetKeyDelay 0,0
#NoTrayIcon
Delay = 250

~PgDn up::
If (A_PriorHotkey = A_ThisHotkey and A_TimeSincePriorHotkey < Delay)
WinMinimize, A
Return
~PgUp up::
If (A_PriorHotkey = A_ThisHotkey and A_TimeSincePriorHotkey < Delay)
WinMaximize, A
Return

Adding "up" to the hotkey will only trigger it when the key is released, fixing the keyboard repeat problem! smiley

I must say congrats justice, this was a really great idea cheesy
Logged

justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: February 01, 2008, 06:01:29 AM »

Ah you made some changes cheesy Mind if i incorporate that? smiley
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 #7 on: February 01, 2008, 06:04:43 AM »

Sure, that was the idea smiley
Logged

justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: February 01, 2008, 06:10:51 AM »

Take out the line SetKeyDelay 0,0 as this still triggers the minimizing if you're holding the key even with your fix..
v4 coming up  tellme Thanks for all the help and testing. sometimes I get too excited lol  Wink
« Last Edit: February 01, 2008, 06:12:42 AM by justice » Logged

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



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: February 01, 2008, 10:01:00 AM »

this might be moot point since you already have a working script.. thumbs up but just for the record, this tool, FreeSnap and its AHK equivalent by Armando can also be used for the same purpose..

Quote from: FreeSnap help file
The number-pad “Enter” key will maximize the window when it is normal size and vice-versa. The “0” key will minimizes the window.
Logged

Lashiec
Member
**
Posts: 2,374


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #10 on: February 01, 2008, 01:44:54 PM »

Sounds interesting. I usually don't use AutoHotkey apps (except for WinWarden), but I think I could find an use for this one. Thanks for your work! Thmbsup
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 #11 on: February 01, 2008, 02:43:29 PM »

And... Here's another adition:

[copy or print]
{
    WinExist("A")
    WinGet, MaxState, MinMax,
    if(MaxState = 1)
      {
      WinRestore
      return
      }
     WinMaximize
}
If you use that instead of WinMaximize, A, you'll get a maximize toggle effect Wink
Logged

nogojoe
Charter Member
***
Posts: 136


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #12 on: February 02, 2008, 03:38:28 PM »

Hi Coders

Like this idea , kinda works for me half pie. the 2x operation is great

2x right control minimizes the open window to the taskbar.

2x right shift does nothing to open the window from the taskbar  but does open when the window has been half closed via the middle button (top right toolbar ... middle button ).

Plays havoc with my program Spell Catcher Plus as it has Ctrl as its main menu/macro key .although I have changed those macro keys it still picks up the ctrl somewhere along the line and opens its window.

Is it possible to have the Scroll lock + Pause break keys  operate the actions for minimize/maximize.
I never use those keys at all on my keyboard.

I have a standard 101/102 key or Micrsoft Natural PS/2 keyboard     running Win Xp sp2

Thanks  nogojoe

Logged

Often the most convincing people are those who have lost the plot so much they don't recognize the difference between fact and fantasy
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 #13 on: February 02, 2008, 03:48:48 PM »

@nogojoe: sure, replacing those is very easy... I attached the modified script to my post.

Regarding shift press, please test this new version Wink

[copy or print]
; minimize the current window when pressing right control twice quickly
; maximize the current window when pressing right shift twice quickly
#NoEnv
SendMode Input
#NoTrayIcon
Delay = 250

~ScrollLock up::
If (A_PriorHotkey = A_ThisHotkey and A_TimeSincePriorHotkey < Delay)
WinMinimize, A
Return
~Pause up::
If (A_PriorHotkey = A_ThisHotkey and A_TimeSincePriorHotkey < Delay)
        {
            WinExist("A")
            WinGet, MaxState, MinMax,
            if(MaxState = 1)
              {
              WinRestore
              return
              }
             WinMaximize
        }

Return

* MiniMe.ahk (0.62 KB - downloaded 269 times.)
* MiniMe.exe (198.89 KB - downloaded 313 times.)
Logged

nogojoe
Charter Member
***
Posts: 136


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #14 on: February 02, 2008, 05:28:59 PM »

Hi jgpaiva

Pause break works ok toogles to minimize open window to what size you want and reopens fully

Scroll lock just sends the current window straight to  the taskbar with no other action cant raise it to full open window from there,(via those keys)

Doesn’t interfere with spellcatcher plus now.

nogojoe
Logged

Often the most convincing people are those who have lost the plot so much they don't recognize the difference between fact and fantasy
willwilliams
Supporting Member
**
Posts: 12

View Profile Give some DonationCredits to this forum member
« Reply #15 on: February 02, 2008, 05:53:45 PM »

Hi, FWIW, alt-spacebar, n has worked to minimise the active window, for me, since Win95.  Nice to see some quick coding solving your problem in the way you want, though.

Will
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 #16 on: February 02, 2008, 05:56:16 PM »

Scroll lock works the same way it worked before, minimizes to taskbar the active window... It does the same as pressing the minimize button, just as double-pause does the same as pressing the maximize (middle) button.
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 #17 on: February 02, 2008, 05:57:45 PM »

Hi, FWIW, alt-spacebar, n has worked to minimise the active window, for me, since Win95.  Nice to see some quick coding solving your problem in the way you want, though.

Will
That's true, but double-shift press is soo much more confortable than pressing alt+space and X.
Also, i've got alt+space reserved by the great FARR smiley
Logged

nogojoe
Charter Member
***
Posts: 136


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

Hi, FWIW, alt-spacebar, n has worked to minimise the active window, for me, since Win95.  Nice to see some quick coding solving your problem in the way you want, though.

Will
that is true , but this way toggles from minimize to maximize --maximise to minimize using the same action 2xpause/break .

The 2x scroll lock comes in handy when you wish to get a window out of the way.
tried it with several windows open goes great

I’m liking it more and more. Thmbsup

What’s is the shortcut for maximizing a window from the taskbar tellme

nogojoe
Logged

Often the most convincing people are those who have lost the plot so much they don't recognize the difference between fact and fantasy
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 #19 on: February 02, 2008, 07:30:41 PM »

What’s is the shortcut for maximizing a window from the taskbar tellme
That's the problem... There isn't one smiley
You have to look for the right window with alt+tab, and when you release alt+tab, it'll be restored (come out from the taskbar).
Logged

nogojoe
Charter Member
***
Posts: 136


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #20 on: February 02, 2008, 08:27:07 PM »

What’s is the shortcut for maximizing a window from the taskbar tellme
That's the problem... There isn't one smiley
You have to look for the right window with alt+tab, and when you release alt+tab, it'll be restored (come out from the taskbar).

Well you know what the next question is Can you code it with a 2x print scr cheesy cheesy
Logged

Often the most convincing people are those who have lost the plot so much they don't recognize the difference between fact and fantasy
justice
Supporting Member
**
Posts: 1,889



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #21 on: February 02, 2008, 08:43:47 PM »

aye you can code it to maximize the last minimized window but it would only make sense if no window is selected.. you better look at putaside.
Logged

nogojoe
Charter Member
***
Posts: 136


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #22 on: February 03, 2008, 12:38:06 AM »

aye you can code it to maximize the last minimized window but it would only make sense if no window is selected.. you better look at putaside.

Thats good just what i was after.
Was running minime as well and ran into trouble with the scroll key not functioning.
As minime has 2x scroll lock as an action it kinda waylaid Putaside.

All 3 actions Minime and Putaside create would be great if they could compliment each other as there is a need for all three.
It would be great if all three could operate with the 2x key action possibly using the print screen/scroll lock/pause-break keyboard keys.
The way I see it you could have

2x print screen minimizes the window to the taskbar

2x scroll lock hides all windows and if possible 1x scroll lock does what shift/scroll does now (or maybe 3xscroll 2x scroll lock)

2x pause break toggles the window minimize maximize without sending to the taskbar.

Just my thought

nogojoe

On second thoughts the print screen/scroll lock key actions could be reversed would feel better.

Logged

Often the most convincing people are those who have lost the plot so much they don't recognize the difference between fact and fantasy
sri
Honorary Member
**
Posts: 673


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #23 on: February 03, 2008, 01:02:02 AM »

I guess something is wrong w/ AutoHotKey on my computer. I double clicked the .ahk file and it seems to be running, but I can't see its icon in the sys tray. When I hit Ctrl or Shift twice to minimize and maximize respectively, nothing happens.

When I double click the .ahk file a second time, it asks me whether I want to replace the running instance. But I don't see a running instance!
Logged

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



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #24 on: February 03, 2008, 01:24:47 AM »

try updating, usually updating your Autohotkey will solve the problem.
Logged

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.049s | Server load: 0.01 ]