AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

WinTraymin to trayicon
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Sean



Joined: 12 Feb 2007
Posts: 1337

PostPosted: Tue Jul 01, 2008 9:56 am    Post subject: WinTraymin to trayicon Reply with quote

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
View user's profile Send private message
nonov
Guest





PostPosted: Tue Jul 01, 2008 10:14 am    Post subject: Reply with quote

Very nice function and nice demonstration !
Thanks for sharing
Back to top
tidbit



Joined: 10 Mar 2008
Posts: 90

PostPosted: Wed Jul 02, 2008 3:23 am    Post subject: Reply with quote

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
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1205
Location: USA

PostPosted: Wed Jul 02, 2008 4:50 am    Post subject: Reply with quote

this is freakin awesome. Very Happy 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 Sad ...is there anything that can be done to trigger the onexit routine in that case Question
[I got my windows back with Sysinternals Process Explorer]
_________________
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1337

PostPosted: Wed Jul 02, 2008 4:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1337

PostPosted: Wed Jul 02, 2008 5:17 am    Post subject: Reply with quote

ahklerner wrote:
one question, ran the script from scite and terminated it with the 'stop executing' function...and lost my windows Sad ...is there anything that can be done to trigger the onexit routine in that case Question
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
View user's profile Send private message
AZA



Joined: 10 Mar 2008
Posts: 158
Location: USA

PostPosted: Wed Jul 02, 2008 5:43 am    Post subject: Reply with quote

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!
_________________
Check out my BF2 macros here: http://www.autohotkey.com/forum/viewtopic.php?t=29706
Back to top
View user's profile Send private message MSN Messenger
Sean



Joined: 12 Feb 2007
Posts: 1337

PostPosted: Wed Jul 02, 2008 7:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1337

PostPosted: Wed Jul 02, 2008 7:24 am    Post subject: Reply with quote

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
View user's profile Send private message
HugoV



Joined: 27 May 2007
Posts: 497

PostPosted: Wed Jul 02, 2008 1:38 pm    Post subject: Reply with quote

Nice Exclamation
Back to top
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1205
Location: USA

PostPosted: Wed Jul 02, 2008 2:20 pm    Post subject: Reply with quote

I nominate this for the script showcase that is distributed with ahk. Smile
_________________
Back to top
View user's profile Send private message
TopDawggamer
Guest





PostPosted: Wed Jul 02, 2008 2:55 pm    Post subject: Reply with quote

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

PostPosted: Wed Jul 02, 2008 3:02 pm    Post subject: Reply with quote

I just noticed that Excel borks with it. when reshowing the window, only the workbook is shown.
_________________
Back to top
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1337

PostPosted: Wed Jul 02, 2008 3:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sean



Joined: 12 Feb 2007
Posts: 1337

PostPosted: Wed Jul 02, 2008 3:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group