Jump to content

TrayItem Icon


C2C
 Share

Recommended Posts

Ive seen that it could be done but then again I cant do it. Any help is welcome

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Link to comment
Share on other sites

Function Reference

TraySetIcon

--------------------------------------------------------------------------------

Loads/Sets a specified tray icon.

TraySetIcon ( [iconfile [, iconID] )

Parameters

filename [optional] The filename of the icon to be display in the tray.

iconID [optional] Icon identifier if the file contain multiple icons.

Return Value

Success: Returns 1.

Failure: Returns 0.

Remarks

To reset the icon to the default, use the function with no parameters:

TraySetIcon().

Passing a positive number will reference the string equivalent icon name.

Passing a negative number causes 1-based "index" behaviour. Some Dll can have icon extracted

just with negative numbers.

Related

TraySetPauseIcon

Example

#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

tolle indicium

Link to comment
Share on other sites

#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
Thats a nifty trick but what im looking for is setting the icon next to a tray item. Like in your script when you right click you get exit. Is it possible and how to set a icon next to that exit?!

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Link to comment
Share on other sites

Compile the script with an icon? lol?

Or, do you want it to be seperate from the main icon?

NO NO in the tray menu. Tray menu has tray items. how do i put icons next to a tray item.

Thanks,

C2C

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Link to comment
Share on other sites

OHHHHH, like the little Exit, and Pause item things?

Posted Image

I need that :D

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Link to comment
Share on other sites

Ive seen that it could be done but then again I cant do it. Any help is welcome

anyone? plz help :D

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

Link to comment
Share on other sites

anyone? plz help :D

i guess this isnt such a noobish question :P

----------------------------------90% of teens today would die if Myspace,Bebo + FaceBook had a system failure and was completely destroyed. If you are one of the 10% that would be laughing, copy and paste this to your signature.----------------------------------Code to win, 'till you die, 'till the compiler dies from your linesCode to win, take it all, just keep coding till you fallDay by day, codin' all the way, I'm not cavin' inLet another App begin, code to win

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...