| View previous topic :: View next topic |
| Author |
Message |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Tue Jul 01, 2008 9:56 am Post subject: WinTraymin to trayicon |
|
|
It'll minimize a window to a trayicon. Left/Middle/Right click on the trayicon will restore the window. And if the window is activated via other means the corresponding trayicon will be removed too.
The hotkeys to traymin are currently set to Right Click on the minimize button.
DOWNLOAD WinTraymin.zip.
Last edited by Sean on Fri Jul 04, 2008 11:09 am; edited 2 times in total |
|
| Back to top |
|
 |
nonov Guest
|
Posted: Tue Jul 01, 2008 10:14 am Post subject: |
|
|
Very nice function and nice demonstration !
Thanks for sharing |
|
| Back to top |
|
 |
tidbit
Joined: 10 Mar 2008 Posts: 90
|
Posted: Wed Jul 02, 2008 3:23 am Post subject: |
|
|
thank you very much!
i have been looking for something like this for so long! and to....."dumb" (for lack of a better word) to make it myself.
thank You! _________________ rawr. be very affraid |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1205 Location: USA
|
Posted: Wed Jul 02, 2008 4:50 am Post subject: |
|
|
this is freakin awesome. great script...gonna be on all the time..
one question, ran the script from scite and terminated it with the 'stop executing' function...and lost my windows ...is there anything that can be done to trigger the onexit routine in that case
[I got my windows back with Sysinternals Process Explorer] _________________
 |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Wed Jul 02, 2008 4:54 am Post subject: |
|
|
| Thanks guys. Yes, I was surprised when I realized never seen the codes alike as all needed codes have been around a while. However, after starting to write the code I could guess why. It's not a matter of codes, it's a matter of design to take into account of all possible scenarios. I'm still not 100% sure if I had done that, so, if found a problem please post here. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Wed Jul 02, 2008 5:17 am Post subject: |
|
|
| ahklerner wrote: | one question, ran the script from scite and terminated it with the 'stop executing' function...and lost my windows ...is there anything that can be done to trigger the onexit routine in that case  | Wow, I've never thought of that situation. I have an idea how to deal with it, however, it showed some glitch when I activated the AHK's window through its trayicon in a quick test, so needs more test. I'll try again as soon as I have a time. |
|
| Back to top |
|
 |
AZA
Joined: 10 Mar 2008 Posts: 158 Location: USA
|
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Wed Jul 02, 2008 7:23 am Post subject: |
|
|
| Sean wrote: | | I have an idea how to deal with it |
I was wrong. There seems to be no way inside AHK to catch TerminateProcess. Although it's easy to write an emergency script which will restore all minimized and hidden windows, it also shows a bad side-effect, i.e. to make shown unwanted windows too. Well what would be the best compromise? Maybe list all minimized and hidden windows and let the user select ones then show them?
Last edited by Sean on Wed Jul 02, 2008 7:26 am; edited 1 time in total |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Wed Jul 02, 2008 7:24 am Post subject: |
|
|
| AZA wrote: | | Oh hell yea!! This is some bad ass s**t!! I can't wait to start messing around with this. Well done Sean, you rock! |
Thanks fella! |
|
| Back to top |
|
 |
HugoV
Joined: 27 May 2007 Posts: 497
|
Posted: Wed Jul 02, 2008 1:38 pm Post subject: |
|
|
Nice  |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1205 Location: USA
|
Posted: Wed Jul 02, 2008 2:20 pm Post subject: |
|
|
I nominate this for the script showcase that is distributed with ahk.  _________________
 |
|
| Back to top |
|
 |
TopDawggamer Guest
|
Posted: Wed Jul 02, 2008 2:55 pm Post subject: |
|
|
This is a great script but I found one problem with it. I use the fire gestures add-on with Firefox so I can go back a page by holding the right button and left clicking, or forward a page by holding the left button and right clicking. Going forward still works great but I can't go back while this script is running. I don't know exactly how the script works because I don't code but if I hold the right button and left click something in the context menu it selects that item so I know it is not disabling the left button while the right is down.
Any possible fix for this? Thanks. |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1205 Location: USA
|
Posted: Wed Jul 02, 2008 3:02 pm Post subject: |
|
|
I just noticed that Excel borks with it. when reshowing the window, only the workbook is shown. _________________
 |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Wed Jul 02, 2008 3:24 pm Post subject: |
|
|
| ahklerner wrote: | | I just noticed that Excel borks with it. when reshowing the window, only the workbook is shown. |
I think that part is easy to fix, adding WinShow before WinActivate in WM_SHELLHOOKMESSAGE(). However, it may be felt a bit lagging (:so I removed WinShow part). Would you tell about your notice after adding WinShow?
PS. I uploaded a quick fix of it in the same link. How is it?
Last edited by Sean on Wed Jul 02, 2008 4:05 pm; edited 1 time in total |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 1337
|
Posted: Wed Jul 02, 2008 3:29 pm Post subject: |
|
|
| TopDawggamer wrote: | | This is a great script but I found one problem with it. I use the fire gestures add-on with Firefox so I can go back a page by holding the right button and left clicking, or forward a page by holding the left button and right clicking. Going forward still works great but I can't go back while this script is running. I don't know exactly how the script works because I don't code but if I hold the right button and left click something in the context menu it selects that item so I know it is not disabling the left button while the right is down. |
I think that's because of using RButton as hotkey. How about changing the button to the other one like MButton? |
|
| Back to top |
|
 |
|