Jump to content

Change Tray Icon


Recommended Posts

Is there any way to change the tray icon while the program is running ?

<{POST_SNAPBACK}>

DLLCalls and a lot of very ... very messy code. More trouble than it's worth, honestly.

You can hide the icon.....

Maybe that would be the start of the process....hide it, change it, unhide it. *shrug*

1. steal underpants...(hide it)

2. .... (change it)

3. profit. (unhide it)

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Or download latest beta with Holger's tray stuff (and lots of other great new functions) here

and run this example from the help file:

#Include <Constants.au3>
#NoTrayIcon

Opt("TrayMenuMode",1)  ; Default tray menu items (Script Paused/Exit) will not be shown.

$exititem      = TrayCreateItem("Exit")

TraySetState()

$start = 0
While 1
    $msg = TrayGetMsg()
    If $msg = $exititem Then ExitLoop
    $diff = TimerDiff($start)
    If $diff > 1000 Then
        TraySetIcon("Shell32.dll",Random(0,100,1))
        $start = TimerInit()
    EndIF
WEnd

Exit
Link to comment
Share on other sites

If you look in my http://www.autoitscript.com/fileman/users/public/Steph/ you will find PingIt, which changes the it's tray icon depending on whether the 'ping' is OK or not. As tuape says, you will need Holger's tray bits in the latest beta (see link above).

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...