Sign in to follow this  
Followers 0
Diana (Cda)

Minimize to tray possible at all?

4 posts in this topic

I've searched through the forum for help with this as per normal. I've tried many, many things this morning but nothing works.

Here is the code so far:

;
; AutoIt v3.0
;

#NoTrayIcon     ; AutoIt's icon doesn't show in systray
TraySetState(2) ; Hide the tray icon

AutoItSetOption("WinTitleMatchMode", 2)     ; this allows partial window titles to be valid!

SoundSetWaveVolume(50);  adjusts the volume up to the percent level in the brackets - i.e., (25) = 25%, (50) = 50%, etc.

If Not ProcessExists("SayTime95.exe") Then Run(@ScriptDir & "\APP- SayTime 95 v4.05\SayTime95.exe","", @SW_HIDE)
AutoItSetOption("WinTitleMatchMode", 2)   ;  this allows partial window titles to be valid!

Opt("TrayIconHide", 1)   ;  hide tray icon with option #1
WinSetState("SayTime 95","",@SW_HIDE) 


Exit
; finished
I might have a bit of a mishmash of stuff that might not work together. I kept trying different things for the state of the app after reading different posts so the AutoItSetOption might not go with the Opt tray line and/or the WinSetState, etc., but no combination or code singly by itself seems to do anything so don't know what should go here and what shouldn't. Bottom line is that I still have an icon in the tray _and_ on the taskbar when all I need is one in the tray no matter what I've tried.

This post [http://www.autoitscript.com/forum/index.php?showtopic=46652&hl=minimize+tray] implies that a 3rd party app or something might be needed. The post if dated May of this year so was wondering if this was actually true, and if so, if still true of the beta that I recently dl (v3.2.5.0).

'Mimicking the minimize to tray' via this post here [http://www.autoitscript.com/forum/index.php?showtopic=46793&hl=minimize+tray] didn't work either.

At any rate, was hoping to know if this can be done with a 100% AI solution and suggestions as to code that would do it.

Thanks! :)

Share this post


Link to post
Share on other sites



I've searched through the forum for help with this as per normal. I've tried many, many things this morning but nothing works.

I might have a bit of a mishmash of stuff that might not work together. I kept trying different things for the state of the app after reading different posts so the AutoItSetOption might not go with the Opt tray line and/or the WinSetState, etc., but no combination or code singly by itself seems to do anything so don't know what should go here and what shouldn't. Bottom line is that I still have an icon in the tray _and_ on the taskbar when all I need is one in the tray no matter what I've tried.

This post [http://www.autoitscript.com/forum/index.php?showtopic=46652&hl=minimize+tray] implies that a 3rd party app or something might be needed. The post if dated May of this year so was wondering if this was actually true, and if so, if still true of the beta that I recently dl (v3.2.5.0).

'Mimicking the minimize to tray' via this post here [http://www.autoitscript.com/forum/index.php?showtopic=46793&hl=minimize+tray] didn't work either.

At any rate, was hoping to know if this can be done with a 100% AI solution and suggestions as to code that would do it.

Thanks! :)

What exactly are you trying to do? Are you trying to minimize SayTime to the tray (and remove it from the taskbar)? If so, then this post has code to cycle through each taskbar button and hide/show the button. Seems like you could do something similar, but do it just for SayTime. Only question then would be how would you work with the SayTime application? Does it have a taskbar icon with menu?

Share this post


Link to post
Share on other sites

Do you want to minimize your own application to the system tray? If so there is one of those in my signature.

If you want to hide an external application then I think you would have to hide the window of the app, and then use your tray icon in the autoit script as the notification to reshow it.

Share this post


Link to post
Share on other sites

Thank you all, I do appreciate all the help. I had a whole msg typed up in response when something occurred to me. When I used this great little utility in Win98, I'm almost 100% sure it never appeared on the Taskbar. It started to do that when I moved everything over to XP last fall. But it only occurred to me right now to check to see if it had an options or preferences section where I could make any changes. Happily enough, I could change the behaviour to minimize to tray. <phew> So, this is no longer a problem.

Thank you so much to everyone who responded. Yes, I spent a lot of time on this but I never regret that. I learned a lot like I always do when going through all the AI searches that I do. I have to feel like I get closer to being more independent in creating my own code <g>.

Thanks! :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0