Jump to content

Recommended Posts

Posted

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?

Posted

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
Posted

TraySetClick()?

Thanks, this was exactly what I was looking for, no idea though how I could miss that function in the help-file. Works like a charm now :)

  • 9 months later...

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...