Discussion:
Add an applescript app to another application's menu?
(too old to reply)
phakey
2020-12-24 02:43:42 UTC
Permalink
Is there a straightforward way to add an apple script app to
another application's menus? Like the services menu, an existing
menu, or another menubar item? I want to effectively add a new
command to a File menu of a particular application for the top
document window. I can get the top window file in the apple
script and then do the file changes. I would just like something
more convenient than switching to Finder just to double click the
apple script app.
Chris Schram
2020-12-24 03:13:12 UTC
Permalink
Post by phakey
Is there a straightforward way to add an apple script app to
another application's menus? Like the services menu, an existing
menu, or another menubar item? I want to effectively add a new
command to a File menu of a particular application for the top
document window. I can get the top window file in the apple
script and then do the file changes. I would just like something
more convenient than switching to Finder just to double click the
apple script app.
In Script Editor, enable the Scripts menu, then put your AppleScript in
~/Library/Scripts/Applications/<your_app>/

...or did I misunderstand your question?
--
***@me.com is a filtered spam magnet. Email replies may be lost.
You're better off replying to this newsgroup.
phakey
2020-12-24 05:51:36 UTC
Permalink
Post by Chris Schram
Post by phakey
Is there a straightforward way to add an apple script app to
another application's menus? Like the services menu, an existing
menu, or another menubar item? I want to effectively add a new
command to a File menu of a particular application for the top
document window. I can get the top window file in the apple
script and then do the file changes. I would just like something
more convenient than switching to Finder just to double click the
apple script app.
In Script Editor, enable the Scripts menu, then put your AppleScript in
~/Library/Scripts/Applications/<your_app>/
...or did I misunderstand your question?
Thanks. Script interface is created. Now I just have to finish
what the script will do.
Your Name
2020-12-24 06:20:42 UTC
Permalink
Post by phakey
Is there a straightforward way to add an apple script app to
another application's menus? Like the services menu, an existing
menu, or another menubar item? I want to effectively add a new
command to a File menu of a particular application for the top
document window. I can get the top window file in the apple
script and then do the file changes. I would just like something
more convenient than switching to Finder just to double click the
apple script app.
Chris Schram already replied about AppleScript / Script Editor, but
another option might be to use Automator, where you can create a
Service. You can even use both by having Automator run an AppleScript.
Ïnvalid
2020-12-24 12:42:18 UTC
Permalink
Post by phakey
Is there a straightforward way to add an apple script app to
another application's menus? Like the services menu, an existing
menu, or another menubar item? I want to effectively add a new
command to a File menu of a particular application for the top
document window. I can get the top window file in the apple
script and then do the file changes. I would just like something
more convenient than switching to Finder just to double click the
apple script app.
Are you Sirius?
--
fold, spindle, mutilate
Lewis
2020-12-24 17:53:52 UTC
Permalink
Post by phakey
Is there a straightforward way to add an apple script app to
another application's menus?
Yes, the script menu is just for this, and any Macintosh app SHOULD
support it.

Open up ~/Library/Scripts

Create a folder named "Applications" if it does not already exist.

In that folder creat folder with the names of Applications.

Applications
├── Mail
├── Pages
└── Safari

Place scripts in there.

A menu will appear in those apps with a AppleScript "scroll" icon and
your scripts will be in there.

Some applications may have a different location, like BBEdit prefers
scripts in it's own folder.
Post by phakey
Like the services menu, an existing
menu, or another menubar item? I want to effectively add a new
command to a File menu of a particular application for the top
document window.
No, adding commands to the existing menus isn't supported, or not easily
at least, unless the App itself supports it (like BBEdit willallow you
to attach a script to a menu item, though not I don't think add a new
item to the menus)

This should help:

<https://support.apple.com/guide/script-editor/access-scripts-using-the-script-menu-scpedt27975/mac>
--
"Are you pondering what I'm pondering?"
"Wuh, I think so, Brain, but will they let the Cranberry Duchess stay
in the Lincoln Bedroom?"
Continue reading on narkive:
Loading...