How to have app shortcut in menu bar mac - macos

I made an applescript and want it to be in the menu bar. So when I click it in the menu bar, it will run. I don't want it in my dock. How can I do that. Can I do it in my script or can I do it with an app that puts app shortcuts in the menu bar. I am on OSX Yosemite.

Related

macOS: How to show a menu bar main menu without a dock icon

I have a macOS app that has a main menu in the menu bar (not an NSStatusItem). I would like this main menu to be visible when one of the app's windows is focused. However, I do not want this window to have a dock icon.
When I set LSUIElement to true, I notice that the menu bar never appears.
I have a feeling LSUIElement breaks the menu bar completely. Is there an alternative approach to giving an app menu bar menus without having a dock icon?
I'm on 10.14.3. What's strange is others seem to have success creating a menu bar in the app. But no matter how many times I focus my app, the menu bar does not appear.
setActivationPolcy(...) seems to prevent the main menu from appearing entirely. LSUIElement does not show the menu either.

Is it possible to show and interact with the Finder (Mac) via a Menu Bar App?

Is it possible to show and interact with the Finder (Mac) via a Menu Bar App? And if it is, how do I do that in Swift? I have very little coding experience, but want to develop a MenuBar App.

How does Dropbox install the App Icon + "Move to Dropbox" global context menu item in Mac OS X Finder?

When Dropbox is installed on Mac OS X, it installs a "Move to Dropbox" context menu item when right-clicking on any item in Finder:
I would like to install a similar menu item for other my own app. Specifically, I would like an "Open in AppName" menu item that allows me to quickly open files in the app without wading through the "Open With..." menu mess.
I have found ways to add Automator services for these actions.
However, these are installed at the bottom of the menu, in "Services". They also do not have an app icon, which is key for quickly visually finding the correct menu item in the list.
I would instead like to exactly replicate the "Move to Dropbox" menu item:
App Icon is displayed.
Near top of context menu, not at the very bottom.
What method does Dropbox use? How can I replicate it for my own app?
Does one need to include code for this menu item in the app itself?
Is it possible for the user to add such a menu item for any app, similar to automator/services, without touching the app's code?
Dropbox is currently using Finder Sync extension. You can do all of that using it. Very simple to integrate and implement.

What is the technical term for a Mac app that resides in the menu bar?

I come from iOS to the Mac and want to make a simple utility that lives in the menu bar at the top right.
Some "menu bar apps" open a "window" like a speech bubble. The app is in the "window". When you click outside the "window" the "window" closes.
Here is a good looking example from Crashlytics Mac app:
Found this example project but I want to learn more about it and what it is called officially.
The OS X Human Interface Guidelines call them menu bar extras.

Hiding NSMenu while the dock remains active

I want my app to show his menu on launch only if the user didn't open a file. Now I can't seem to make it work. Hiding the menu makes the dock and the status bar invisible. I want them to still be there, but not with my own menu (e.g. if you open a file from finder, the finder menu is still visible, but my app opens a window that handles the file, and quits if the user cancels or on completion).
I probably didn't explain it well enough, but here's what I did to solve it :
Add this line to the plist of my app (this produces an app without dock icon or menu), the dock and the menu bar will still be there, but won't be changed by the app :
LSUIElement
(And set the checkbox to true).
This makes your app UI-only (it doesn't show his NSMenu nor does it add an icon to the dock, but just shows your GUI.

Resources