Skip to content

Instantly share code, notes, and snippets.

@paulz
Created June 28, 2020 07:25
Show Gist options
  • Select an option

  • Save paulz/d711c284905f08bec560e2233e276353 to your computer and use it in GitHub Desktop.

Select an option

Save paulz/d711c284905f08bec560e2233e276353 to your computer and use it in GitHub Desktop.
Finder Service Open Application
# Open File or Folder with an application
#
# Create Automator new Quick Action workflow with these 3 actions:
# 1. Workflow receives "files or folders" in "any application
# 2. Get Specified Finder Items - used for debugging
# 3. Run Apple Script
#
# Paste script below and change Atom.app to any other appp
# Test shell script command works in terminal
# Test Automator workflow by adding items in step 2
#
on run {input, parameters}
set fileOrfolderToOpen to POSIX path of input
do shell script "open -a Atom.app " & fileOrfolderToOpen
return input
end run
@paulz
Copy link
Author

paulz commented Jun 28, 2020

Screen Shot 2020-06-28 at 12 27 30 AM

Automator will save workflow in ~/Library/Services

@paulz
Copy link
Author

paulz commented Jun 28, 2020

Screen Shot 2020-06-28 at 12 28 58 AM

add a keyboard shortcut, such as Cmd-Option-Ctrl-O to new Service in System Preferences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment