Jump to content

Is this Systray-behavior possible?


Recommended Posts

I want to know if the following Systray-icon behavior is possible using Auto-It v3: Left-click restores a minimized GUI and right clicking it shows a tray-menu. I know other (non-AutoIt) programs with this behavior, but I wasn't able to recreate it.

The main problem is that if I create a menu that it appears no matter if I left-click or right-click the systray-icon. And I'm also unable to prevent this by looking for the return value "$TRAY_EVENT_PRIMARYDOWN" of TrayGetMsg() and restoring the GUI before the menu appears.

So I thought of only creating the menu when I read $TRAY_EVENT_SECONDARYDOWN, but in this case the menu won't appear before I either left- or right-ckick the systray-icon again. And it once again doesn't matter if it's the left or right mouse button.

This means my problem is basically to be able to set/force which event actually creates a systray-menu it seems. But from what I read in the manual there seems to be no way to do this or am I missing something?

Link to comment
Share on other sites

I want to know if the following Systray-icon behavior is possible using Auto-It v3: Left-click restores a minimized GUI and right clicking it shows a tray-menu. I know other (non-AutoIt) programs with this behavior, but I wasn't able to recreate it.

The main problem is that if I create a menu that it appears no matter if I left-click or right-click the systray-icon. And I'm also unable to prevent this by looking for the return value "$TRAY_EVENT_PRIMARYDOWN" of TrayGetMsg() and restoring the GUI before the menu appears.

So I thought of only creating the menu when I read $TRAY_EVENT_SECONDARYDOWN, but in this case the menu won't appear before I either left- or right-ckick the systray-icon again. And it once again doesn't matter if it's the left or right mouse button.

This means my problem is basically to be able to set/force which event actually creates a systray-menu it seems. But from what I read in the manual there seems to be no way to do this or am I missing something?

TraySetClick()?
"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110
Link to comment
Share on other sites

  • 9 months later...

lol aye thx , me to exactly the same problem and i didn't find TraySetClick() either :P until i found your post. i wonder why this command is a little hard to spot?

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
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
 Share

  • Recently Browsing   0 members

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