Menu Bar icon clicked on and runs a function - swift

I was wondering if someone could help me out with a bit of syntax.
I have a menu bar app that I would like to run a function then the icon is clicked.
I have tried messaging about with this syntax with left click right click but it first runs the function and dent open the menu.
Is there a way to make it run the function as well as open the menu at the same time?
Miles

Related

Is there way to handle system tray icon window over dropdown window

How to access/use the window which is underneath another window upon it, please click on the link to check this case
I'm using pywinauto to do this, is there a way to handle this case/issue.
Issue:
By following this link, able to open system tray and click on the icon, which results in drop-down menu.
But when i try to mover over mouse to click specific option from drop-down, hidden icons window re-appears on top of the drop-down list, which results in wrong click.
Is there a way to handle these windows?

Chrome JavaScript Console autoselecting the search bar?

Whenever I open the JavaScript developer console in Google Chrome, it automatically selects a search bar that appears at the top of the window. I don't know how to disable the search bar, or otherwise make sure that it isn't automatically selected when I open it. I'd rather have the actual console preselected instead of the search bar. How can I fix this?
Thank you!
I figured it out; at some point I had enabled the filter by clicking on its button to do it (next to the "Clear Console" button). Just disabled it and it's all good now.
In the below image, the filter button is the second from the left (in between the "Clear Console" button and the "top" dropdown for Chome extensions).

Built-in App Launch keyboard shortcut in LinuxMint

Using LinuxMint 12, if you open the "desktops overview" by clicking on the top left corner of the desktop, a little search bar opens on the top-right corner of the desktop. This search does quick app launching without requiring additional plugins, but I can't get an answer on how to get to this launcher without using the mouse.
Does anyone know how I can invoke this launcher with a keyboard shortcut?
Alt+F1 opens the Open Windows selection screen. If you start typing then, the search bar will automatically take focus.

Hide Eclipse Menu Bar (auto-hide)

I'm trying to hide Eclipse menu bar to save some screen real estate. I found I can do this using perspectives but that would permanently take out the menu from that perspective. The behavior that I want to get is something along of auto-hide, so that the menu remains hidden until I hit ALT+F for example or any other ALT key combo.
Is there's a setting or a plugin that can do this?
Thanks!
This is just a work around. Create two perspectives.
First one named - With Menu.
Second one named - Without Menu.
In the "Without Menu" perspective remove all menu items and Save.
To create the effect of hiding and showing, switch between perspectives by using
Ctrl+F8.
Theres a fast view option- just right click the tab and select Fast View. It'll bring the entire window down to the eclipse taskbar. You can recover the window by just clicking on it's icon.
Source: https://bugs.eclipse.org/bugs/show_bug.cgi?id=56119
Have a look here Is there a Macro Recorder for Eclipse? You could set up the macro so respond to ALT+F possibly.

How can I create a YUI menu where you can click to open the submenus?

We have a multi-tiered/hierarchical YUI menu activated via a YUI menu button. Everything in this menu works pretty well. If you mouseover a menu item with a submenu, the submenu appears as expected. You can select an item from this submenu just fine.
The problem, however, is that you can also click on the parent items of this menu which closes the entire menu. In fact, I want the opposite. I'd like a click of a parent menu item leave the top level menu open and open the submenu (i.e. I want a click to be identical to a mouseover event in terms of functionality).
Side note: This isn't an issue on a typical web browser (e.g. Firefox) where the click event doesn't matter because you can't have a click without a mouseover. This is an issue on the iPhone which doesn't have a mouseover event.
I've been playing with the autosubmenudisplay properties and keepopen properties, hoping I can just handle the parent item click events to do what I want but, so far, I've been unsuccessful. If I set autosubmenudisplay to false, I can't figure out how to get the submenus to display manually. The keepopen property doesn't seem to work rather I set it on the menu or submenus.
Is there a way to get the behavior I want so our iPhone users are happy?
Todd Kloots, author of the YUI Button and Menu widgets here. Took at look at your request. Unfortunately the current version YUI Button and Menu aren't designed to support the type of interaction you are looking to create. Feel free to file a feature request via SourceForge and I'll try to work on this for a future version of YUI.
Todd
It's not exactly what you asked for, but have you looked at iUI? You may be able to pick up some tricks from the implementation.