Jump to content

best way to trigger tray


sulfurious
 Share

Recommended Posts

Greets. I have probably a dozen threads open from searching. Before I either close them, or start ripping into code examples, maybe there is an easy way.

Basically, I have script.au3, which creates dynamic menu items based from an .ini file. Simple enough. However, I was wanting to create a hotkey that would pop open the tray menu, so that I don't have to use the mouse all the time. I guess very similar to the windows key, where navigation is a couple up arrows and an 'enter'.

Looking through the search results, there are numerous examples of using Pauls libraries or the systray udf. I can do that I guess. But is there no way natively to trigger this? Oh, I should state that I am using on event mode for this. TraySetState() I thought would provide this, but no.

I can post the code, but it is not specific to my code I would not think.

Any quick tips?

Thank you for any ideas.

Sul.

Link to comment
Share on other sites

If I understand you correctly, I always use:

1 - Ctrl+Esc (opens start menu, also draws up the taskbar if it's hidden),

2 - then press Esc (closes start menu again but leaves focus on start button!)

3 - then press TAB (focus goes to first quicklaunch button but doesn't activate it)

4 - then press TAB again (focus goes to first opened application but doesn't activate it)

5 - press TAB yet again (focus goes to first systray icon, puts a small dashed sqare around it)

Then it leaves me to press Enter or the context menu button or whatever.

So that would be

Send("^{ESC}{ESC}{TAB}{TAB}{TAB}")
Exit

(Modify the TABs to comply with your taskbar layout.)

It is totally quick&dirty and needs to be adapted for your own taskbar but it's the only thing I could think of :D If I understood your problem correctly, that is :P

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

It is too bad I did not post only one, but I know more traffic is in the general help thread, and this applies both to gui and non gui scripts.

Anyway, I have replied in the other thread. I have just made a script with tray items, no gui, it did not work, either in script or compiled. I also tried it by making a tray item create a small gui with a button, and the button performs this function, but it does not display or 'pop up' the tray menu.

Did you have this working?

Thank you,

Sul.

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