Sign in to follow this  
Followers 0
aharown

access apps in system tray?

11 posts in this topic

I have an application that runs in the system tray. With a right click you can select a "log in" option. Is there a way to get at that w/autoIt?

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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"

Share this post


Link to post
Share on other sites

Here's what I see... maybe it's under a topic that looks like something else?

post-19027-1166538512_thumb.gif

Share this post


Link to post
Share on other sites

You need to update your AutoIt, aharown.

Share this post


Link to post
Share on other sites

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

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