Jump to content


Photo

Min2Tray v1.7.9 - minimize window to tray & much more!


  • Please log in to reply
217 replies to this topic

#1 Junyx

Junyx
  • Members
  • 122 posts

Posted 11 July 2005 - 09:25 PM

And another one!

my contribution to the ahk community:
Min2Tray (v1.7.9, 2011/10/11)

minimize a window to system tray area of taskbar as icon.
BossKey feature for minimizing several windows at once.
make window always-on-top and maximize window vertically
or horizontally. StartupMinimize can hide certain windows
upon start of Min2Tray or assign actions. and much, much more!
requires ms windows nt/2000/xp/vista/7 or newer - not tested under win 8, yet ;-)

partial changelog for Min2Tray v1.7.9:
+ new feature: use right mouse click on the close button of the window's titlebar to minimize it.
* replaced some functions by much faster routines from Forms Framework v0.8 by majkinetor. this speeded up systray icon creation and other things enormously!

please use it, test the new features extensively, give reply and suggest new features or implement them yourself :p

thx...
Junyx

#2 Chris

Chris
  • Administrators
  • 10727 posts

Posted 11 July 2005 - 09:57 PM

I looked at the package you put together and it seems quite useful and well explained. Thanks for sharing your work.

#3 skrommel

skrommel
  • Members
  • 193 posts

Posted 12 July 2005 - 11:25 PM

:oops: Why didn't I think of that? One script is much better than my two script attempt in http://www.autohotke...hlight=skrommel. Nice, Junyx!

Skrommel

#4 Junyx

Junyx
  • Members
  • 122 posts

Posted 13 July 2005 - 04:19 PM

well, nothing is perfect. the same for my script. :wink:

currently i'm looking for a way to only allow one instance of the "main" program to be started and run.
"#singleinstance on" doesn't work due to the 2-in-1 script (it has to be started several times as "helper").

any ideas?

Junyx

#5 skrommel

skrommel
  • Members
  • 193 posts

Posted 13 July 2005 - 06:39 PM

None. You need multiple instances to show multiple icons.

Skrommel

#6 TheLeO

TheLeO
  • Members
  • 264 posts

Posted 15 July 2005 - 01:24 PM

qiet nifty,,. thanx

#7 Junyx

Junyx
  • Members
  • 122 posts

Posted 21 July 2005 - 06:29 PM

look at the topmost message! :roll:

Junyx

#8 twhyman

twhyman
  • Members
  • 345 posts

Posted 08 December 2005 - 08:22 PM

file not found , cant download...

#9 twhyman

twhyman
  • Members
  • 345 posts

Posted 10 December 2005 - 08:54 AM

does someone has this file?

#10 mE

mE
  • Guests

Posted 10 December 2005 - 12:48 PM

Can't load it too...

#11 Junyx

Junyx
  • Members
  • 122 posts

Posted 11 December 2005 - 06:09 PM

does someone has this file?


sorry for the inconvenience, folks :shock:
have just updated the file location...

Junyx

#12 twhyman

twhyman
  • Members
  • 345 posts

Posted 18 December 2005 - 02:56 PM

hi,

thanks for posting the script back :)

iam a total noob at AHK ,can u help me integrate the script so i can make my application minimize to tray?

do i need the whole script for that?

thanks
Twhyman

#13 Junyx

Junyx
  • Members
  • 122 posts

Posted 21 December 2005 - 11:54 AM

iam a total noob at AHK ,can u help me integrate the script so i can make my application minimize to tray?

do i need the whole script for that?


well, in order to get a tray icon for the minimized windows you have to start a new instance of AHK - everytime. that's the catch.

1) you need to place my script somewhere (i.e. in the directory where your script is located).

2) include this in your script:
Min2TrayGo:
  WinWait, A,, 2			; set "last used window"
  If ( ErrorLevel )	; It timed out, so do nothing
     Return

  WinGet, h_WinStyle, Style
  
  ; checks for minimizable window: (WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX)
  If ( h_WinStyle & 0xCA0000 = 0xCA0000 )
  {
  	WinGet, h_ID, ID
 		Run, C:\AutoHotkey\AutoHotkey.exe C:\AutoHotkey\Min2Tray\Min2Tray.ahk %h_ID%, , UseErrorLevel
  	If ( ErrorLevel = "ERROR" )	; helper could not be started
  		Return
  }
Return
change paths to my script and AHK.exe according to your needs!

3) to hide the window and create a tray icon just call in your prog:
Gosub, Min2TrayGo

that should do it for you.
please do make your program public domain or GPLv2 and give some credit :-)

Junyx

#14 Junyx

Junyx
  • Members
  • 122 posts

Posted 23 December 2005 - 11:07 AM

:p

#15 ezuk

ezuk
  • Members
  • 149 posts

Posted 25 December 2005 - 03:01 PM

For your info: Doesn't work for me when I put the script in a long path (with spaces in it) such as C:\My Documents\AHK\Scripts .