Sign in to follow this  
Followers 0
nago

Tray Menu

6 posts in this topic

Hello!

The default behaviour for the Tray item is to pause when clicked-- can this be disabled? I don't mind having "Pause" and "Exit" as menu items, but I would like to stop the icon from being paused whenever clicked. I'd like to add some menu items of my own in here, but I'd like to do so without halting the program.

So, I suppose I'd use TrayCreateItem and TrayItemSetOnEvent.

I see that I can use 'break' to stop the user from being able to pause/exit my script, but that's certainly not my goal.

Hilfe? Thanks!

Share this post


Link to post
Share on other sites



Opt("TrayMenuMode", 1)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hello!

The default behaviour for the Tray item is to pause when clicked-- can this be disabled? I don't mind having "Pause" and "Exit" as menu items, but I would like to stop the icon from being paused whenever clicked. I'd like to add some menu items of my own in here, but I'd like to do so without halting the program.

So, I suppose I'd use TrayCreateItem and TrayItemSetOnEvent.

I see that I can use 'break' to stop the user from being able to pause/exit my script, but that's certainly not my goal.

Hilfe? Thanks!

Swifty beat me to it.. Nvm =] Edited by rawrr

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thank you!

Well, that option removes pause and exit from the tray, but I suppose I can add my own.

New question, though.

Opt("TrayMenuMode", 1); Stop tray icon from automatically pausing script
$g_TrayMenuUpdate = TrayCreateItem("Check For Updates")
TrayItemSetOnEvent($g_TrayMenuUpdate,'fCheckForUpgrade')

Doesn't appear to call the fCheckForUpgrade function when I click the menu in the tray. I'm sure I'm missing something obvious. It's been a month or two since I fiddled with autoit and I'm having a hard time making sense of the docs...

EDIT: Yup! Something Obvious. Missed an Option that allows OnEvent things from the Tray. :)

Edited by nago

Share this post


Link to post
Share on other sites

TrayOnEventMode() :) Hope your script is a great one!

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