0

I want to write an applescript application from terminal. So far I have been able to write an .scpt file but that is not enough. I need to convert it to an applescript application that can then be opened and run. I know how to do this using the GUI but for various reasons I need to do it from terminal. Any ideas on any way to do this?

2
  • RTM- osacompile. apropos can be your best friend.
    – fd0
    Oct 27 '15 at 21:05
  • Can you explain how to use those things?
    – A.Murph
    Oct 27 '15 at 23:28
1

To make apple scripts executable from terminal, you may define osascript in shebang, for example:

#!/usr/bin/env osascript
say "Hello World!"

Make it executable, and just run it:

./AppleScriptTest.applescript

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.