Sign in to follow this  
Followers 0
rstolfa

trayicon context menu

5 posts in this topic

Hello all,

I am trying to setup a GUI-less application that needs a "context menu" from the TrayIcon. Is there a simple code snippit that someone could forward my way?

Thanks in advance,

Roland

Share this post


Link to post
Share on other sites



Hello all,

I am trying to setup a GUI-less application that needs a "context menu" from the TrayIcon. Is there a simple code snippit that someone could forward my way?

Thanks in advance,

Roland

See TrayCreateMenu in helpfile. Remember to look at example.


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

herte is a format

opt("TrayMenuMode", 1)
opt("TrayOnEventMode", 1)
$upgrade_tray = TrayCreateItem("Visit " & $Company & " On-Line Now!")
TrayItemSetOnEvent(-1, "Set_Update")
TrayCreateItem("")
$hide_tray = TrayCreateItem("Listen to " & $Load)
TrayItemSetOnEvent(-1, "Set_Play")
TrayCreateItem("")
$show_tray = TrayCreateItem("Show  On-Line Radio")
TrayItemSetOnEvent(-1, "Set_Show")
TrayCreateItem("")
$exit_tray = TrayCreateItem("Exit  On-Line Radio")
TrayItemSetOnEvent(-1, "Set_Exit")
TraySetState()

and the functions

Func Set_Update()
    Run(@ComSpec & " /c Start " & $Company_Site, "", @SW_HIDE)
EndFunc  ;==>Set_Update

Func Set_Show()
    GUISetState(@SW_SHOW, $E_Music)
EndFunc  ;==>Set_Show
Func Set_Play()
    $E_Check = 1
EndFunc  ;==>Set_Play
Func Set_Exit()
    SoundSetWaveVolume($save_level)
    Exit
EndFunc  ;==>Set_Exit

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

See TrayCreateMenu in helpfile. Remember to look at example.

Sorry to be a nubie, but which helpfile? The .chm that came with my 3.1.1.0 build doesn't show this as an option. Is there a separate include or some such that I need to use? Any and all assistance you can provide would be greatly appreciated.

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