I find the AppleScript method of opening a file convenient but often cannot guess at the application name to use when I do not want the default options.
As an example, I have installed Foxit PDF Reader to directly annotate a PDF. I have not been able to guess what to use in the open -a ??? my.pdf
command.
How could I find this for any general application? Perhaps there is some way to get a list of all available options?
Best Answer
You can use
-b
option and use Bundle Identifier instead of using Application name. For example, to get Bundle Identifier from Safari:as a result You'll get
"CFBundleIdentifier" => "com.apple.Safari"
Then You use it like this:
Generally, You'll need to get Bundle Indentifier from
Info.plist
file located insideApplication.app/Contents/
directory.Or if You want, You can get the app name with this:
output: