Jump to content

Recommended Posts

Posted (edited)

Check out the TrayCreateMenu, as well as the other tray help files. What you want can be done. I don't have a decent example of how to run something, but this example from the help menu shows you how to create different menu items in the tray...

#Include <Constants.au3>
#NoTrayIcon

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

$settingsitem   = TrayCreateMenu("Settings")
$displayitem    = TrayCreateItem("Display", $settingsitem)
$printeritem    = TrayCreateItem("Printer", $settingsitem)
TrayCreateItem("")
$aboutitem    = TrayCreateItem("About")
TrayCreateItem("")
$exititem      = TrayCreateItem("Exit")

TraySetState()

While 1
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $aboutitem
            Msgbox(64,"about:","AutoIt3-Tray-sample")
        Case $msg = $exititem
            ExitLoop
    EndSelect
WEnd

Exit

Does that help you?

Edited by someone
While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Posted

  someone said:

Check out the TrayCreateMenu, as well as the other tray help files. What you want can be done. I don't have a decent example of how to run something, but this example from the help menu shows you how to create different menu items in the tray...

...

Does that help you?

It might help... Not sure what these tray help files are or where to get them.

Posted

  Dizzydbd said:

Dude it's easy just search in auto-it help for "tray" u'll find the functions and the examples u need to understand them

Did that. All I found was TrayIconDebug (Option), TrayIconHide (Option) and TrayTip. That was in the index. When I went to general search, also fund CDTray and some unrelated stuff.

I get "no topics found" searching on TrayCreate

Is there a newer help file maybe? I'm on 3.1.1 I guess.

Posted

Are you still not finding it? Make sure you are in the autoit help file and not the scite helpfile... and use the index instead of search

While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd
Posted

  someone said:

Are you still not finding it? Make sure you are in the autoit help file and not the scite helpfile... and use the index instead of search

Nope. Not finding it. The file says "AutoIt Help"

Posted

OK. I've got the latest version and read up on all the tray functions. But I'm not understand which, if any of them would allow me to, say, script the equivalent of a right click on a particular tray icon (that the script did not create) then select a particular menu item.

A couple of the tray functions look close to what I'm after but require a control id and these are not displaying in Active Window Info for any of the tray icons.

So... anybody know if this is doable?

Thanks for your patience... this is all new to me :P

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
  • Recently Browsing   0 members

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