Sign in to follow this  
Followers 0
van_renier

TraySetIcon()

7 posts in this topic

In the help file for v3.1.1.103, there is a sample script which has the following line:

TraySetIcon("warning")

The help file shows it as:

TraySetIcon ( [iconfile [, iconID] )

the above example only has a 'filename' nothing more. Where is this aboe example pulling the warning icon from? is it defaulting to the shell32.dll ?

Is it an internal reference? if so, what other options/values are available?

Thanks for your time and assistance.

Van

Share this post


Link to post
Share on other sites



maybe this sample help you:

#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

Share this post


Link to post
Share on other sites

Appears to be an undocumented feature. Quick trial and error revealed the following (and I imagine these are the main ones since these are the icons you have have for a MsgBox):

stop

question

warning

info


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

maybe this sample help you:

#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

No... that didn't hit the point I was trying to make. the script you specified (which I saw and which made me wonder about the trayseticon("warning") ) actually has a DLL and the icon reference pointer specified. thanks, though.

Van

Share this post


Link to post
Share on other sites

Appears to be an undocumented feature. Quick trial and error revealed the following (and I imagine these are the main ones since these are the icons you have have for a MsgBox):

stop

question

warning

info

Great... As long as it's undocumented, I know don't feel half as stupid as I did earlier for not finding it.

Thanks.

Van

P.S. I said... "as I did earlier for 'not finding it.'" :lmao:

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

#Include <Constants.au3>

#NoTrayIcon

Opt("TrayMenuMode",1)

$show_tray = TrayCreateItem("About this Program")

...

run dispaly "TrayCreateItem" is Unknown function name

help me !

Edited by sxmuse

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