Jump to content
Sign in to follow this  
SleepyXtreme

Window to Taskbar Icon

Recommended Posts

SleepyXtreme

Exactly what the title says.

I'm trying to add a option to my program so that when all the visible windows are hidden, each group of windows, ie Internet explorer, firefox, aol instant messenger, is in a sense minimized to the taskbar. then you can click on the taskbar icons and you can unhide the groups of windows.

i know how to do most of this execpt for the part about making the taskbar icons and stealing the icon from each program and using that as the icon in the taskbar.

Does anyone know how to do this?

Share this post


Link to post
Share on other sites
evilertoaster

hummm maybe a visual would help me here... you are minimizing them to the task bar just like they normally do in windows? XP and above also group similiar items on the taskbar if the option is set...

Share this post


Link to post
Share on other sites
Paulie

TrayCreateMenu()

TrayCreateItem()

Proof of concept:

#include <GUIConstants.au3>
Opt("TrayAutoPause",0)
Opt("TrayMenuMode",1)

$GUI = GuiCreate("Test", 200,100)
$Menu = TrayCreateMenu("Display")
$Hide = TrayCreateItem("Hide", $menu)
$Show = TrayCreateItem("Show", $menu)
$Exit = TrayCreateItem("Exit")
GUISetState()

While 1
    $gMsg=GUIGetMsg()
    $tMsg=TrayGetMsg()
    Switch $gmsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $GUI_EVENT_MINIMIZE
            WinSetState($GUI,"",@SW_HIDE)
    EndSwitch
    Switch $tmsg
        Case $Hide
            WinSetState($GUI,"",@SW_HIDE)
        Case $Show
            WinSetState($GUI,"",@SW_Show)
            WinSetState($GUI,"",@SW_RESTORE)
        Case $Exit
            Exit
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites
SleepyXtreme

Here's the visual: pretend @ is the Internet Explorer symbol and # is the netscape symbol ect ect ect

< @#$%&*

then you left click the @ symbol and all of the internet explorer windows are unhidden and the taskbar now looks like this:

< #$%&*

I want to create NEW icons in the taskbar, not use the icon for the script executable.

Share this post


Link to post
Share on other sites
evilertoaster

taskbar or system tray?

Share this post


Link to post
Share on other sites
Generator

Here's the visual: pretend @ is the Internet Explorer symbol and # is the netscape symbol ect ect ect

< @#$%&*

then you left click the @ symbol and all of the internet explorer windows are unhidden and the taskbar now looks like this:

< #$%&*

I want to create NEW icons in the taskbar, not use the icon for the script executable.

Explain better

Share this post


Link to post
Share on other sites
Paulie

Explain better

He basically wants to make all his programs minimize to the tray icon instead of to taskbar. I originally thought he just wanted his own autoit-created app, but i understand what he wants. as to how to do it, i have no idea.

Share this post


Link to post
Share on other sites
smashly

A not so pretty work around maybe..

Generate a temp script from your main that runs seperately and handles the tray icon for the hidden group of windows.

From what I could gather there's only 1 tray icon per script. (I'm probly wrong about this)

So creating and running another script or 2 or 3 from the main script would be an ugly work around, but it does work.

Can whip up a crude example if need be, but I just can't do it right this sec as I'm just about to leave for work.

Cheers

Share this post


Link to post
Share on other sites
SleepyXtreme

He basically wants to make all his programs minimize to the tray icon instead of to taskbar. I originally thought he just wanted his own autoit-created app, but i understand what he wants. as to how to do it, i have no idea.

Sorry, this is what i meant, minimize to the system tray.

i thought there might be a dll or something to create a New tray window or something.

also, any suggestions on how i grab the icon the window uses, ie the big e from internet explorer. like basicallly i need to do GetIconFromWindow(Hwnd($Window))

Edited by SleepyXtreme

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  

×