Automator

 

Workflow: A workflow you can run within the Automator app.

Application: A standalone workflow that runs when you open it or drop files or folders on it.

Quick Action: A workflow that you can add to Finder windows, the Touch Bar, and the Services menu. For more information about using Quick Action workflows, see Use Quick Action workflows on Mac.

Print Plugin: A workflow that’s available in the Print dialog.

Folder Action: A workflow attached to a folder in the Finder. When items are added to the folder, the workflow runs and the files are used as input to the workflow.

Calendar Alarm: A workflow that runs when a calendar event occurs.

Image Capture Plugin: A workflow that’s available in the Image Capture app on your Mac.

Dictation Command: A workflow that runs when dictation is used.

https://support.apple.com/guide/automator/create-a-workflow-aut7cac58839/2.9/mac/10.15

‘Drop-On’[1] Services menus[2] Where Kept
Workflow ###???
Application Anywhere user want to
Service * $HOME/Library/Services/ (personal)
* /Library/Services/ (shared)
Print Plugin ###???
Folder Action ###???
Calendar Action ###???
Image Capture Plugin ###???
Dictation Command ###???

[1] ###

[2] ###

https://support.apple.com/guide/automator/create-a-workflow-aut7cac58839/2.9/mac/10.15

https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/MakeaSystem-WideService.html

Some special cases, considerations

  1. Installing/keeping an Application in Services location (folder): Does not work, i.e. doesn’t show up as service in Services menu.
  2. Keeping a Service anywhere else but an accepted folder (own or system-wide): get dialog asking to install service, does not run it.

 

Both Application and Service

How to call an Application from a Service, or maybe rather the opposite (as applications can be kept anywhere, and moved, and Services are always in one of two well-defined locations, user-local or shared/global Library/Services).

 

2020-12-19 DO get the following to work, with a few ‘caveats’

  1. Creating an App in Automator, script like below (w/ changed name of service)
    1. Found at https://www.alfredforum.com/topic/3567-anyone-know-how-to-run-an-osx-service-in-a-workflow/
  2. MUST however allow this to run ‘Security & Privacy’ > Privacy: unlock/password, check script row in list,
  3. and then it works to use, for dropping files onto this new app.
-- TestOfRunningServiceFromApp.app
-- set theServiceName to "OmniFocus: New Inbox Task per Line"
set theServiceName to "MediaInfo"

tell application "System Events"
  set appName to item 1 of (get name of processes whose frontmost is true)
  tell (process 1 where frontmost is true)
    tell menu bar 1
      tell menu bar item appName
        tell menu appName
          tell menu item "Services"
            tell menu "Services"
              click menu item theServiceName
            end tell
          end tell
        end tell
      end tell
    end tell
  end tell
end tell