Le risposte alle domande sul Mac

Put a script in Finder contextual menu

Main topics: ResourcesMacGuides

Apple topics: ApplescriptAutomator

Author: Marco Balestra

Run Automator

Automator (or Automator Installer) is an application located in /Applications

Automator icon

New quick action

Onche launched choose “New document”, anche then click on “Quick Action” and “Choose”:

New Quick Action

Set workflow parameters

In the rightest panel define what the workflow receives, in which application it will be active and optionally an icon for the workflow:

Receives what type of inputReceives for which applicationWorkflow icon

“Run AppleScript”

It’s now time to define the action.

From the second column locate and drag on the right the “Run Applecript” item:

Drag run applescript action

Write or paste the text of the Script

Write or paste your code, then click on “Compile” button (the hammer).

In our case it’s the script to import audio files in iTunes:

Paste or write your ApplescriptApplescript compiled

Save

It’s now time to save the workflow. From “File” choose “Save” (⌘S), and give it a name.

Once saved you can command-click (⌘-click) its name on the menu bar to locate it.

File - saveWhere was saved

It’s ready

The Finder plug-in is now available in Finder’s contextual menu, in the “Services” menu item.

Its file is located in ~/Library/Services/workflow name.workflow

© and credits

Original article and materials realized for faqintosh.com by Marco Balestra.

Powered by JBLOUD, © 2021 altersoftware.IT