Is there a way I can call my script/app when I am in another app?
I have a script/app that works well. I use it frequently with Apple Pages. To activate it I have to go to the Dock, click the app, and go back to Pages. It is not a big deal but when I do that many, many times I think it could be very useful to be able to call my script/app only with the keyboard while I am in Pages. I mean, without leaving the keyboard. Is that possible to do?
NMG. There are a number of approaches that will allow you to do what you want, and one is to use an Automator Quick Action. This is a bit cumbersome but is probably adequate with just a few scripts. There are many web postings that explain how this is done and the following is just one:
Another approach is to use a utility designed for this purpose, one example of which is FastScripts. This utility is free for use with up to 10 shortcuts and is $24.95 afterwards. I’m sure there are many other similar utilities.
On macOS Big Sur, It is no longer necessary to have to resort to UI Scripting by activating Script Editor then opening its preferences etc.
This following AppleScript code will do the trick.
tell application "AppleScript Utility"
if not Script menu enabled then
set Script menu enabled to true
set application scripts position to top
set show Computer scripts to true
else
set application scripts position to top
set show Computer scripts to true
end if
end tell