Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Rick Corbett

macrumors newbie
Original poster
Apr 27, 2018
15
0
South-west UK
I've just installed Mojave and really like the new screenshot tool. However, I keep forgetting the keyboard combination to invoke it. I wrote an AppleScript one-liner in Automator which fires the screenshot tool:

Code:
tell application "System Events" to key code 23 using {shift down, command down}

I saved it as an app in Applications and it works perfectly when I double-click on it.

Now, how do I attach it to the System menubar top right (say, next to the Bluetooth icon) - preferably with a custom icon - so it's available no matter what I'm doing? Is it possible?
 
An easy way would be to enable the Script Editor's Script menu and add your app to that (no custom icon for the menu though), otherwise you are looking at using NSStatusItem via Xcode or some AppleScriptObjC.
 
An easy way would be to enable the Script Editor's Script menu and add your app to that (no custom icon for the menu though), otherwise you are looking at using NSStatusItem via Xcode or some AppleScriptObjC.

Thank you so much for the advice. It works perfectly!

I (eventually) found how to add both the Script menu then my script to it (macOS and scripting noob here).

I had spent hours searching online and had only learned how to trigger it as a Dictation command (which was also useful).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.