3

how can I call apple script from shell script.

I have a shell script which I use in Run Script phase of my xcode project. Before this shell script is executed and I want to call another apple script?

1 Answer 1

2

You can use the osascript utility.

Here's the intro to the utility, using man osascript:

OSASCRIPT(1)              BSD General Commands Manual             OSASCRIPT(1)

NAME
   osascript -- execute AppleScripts and other OSA language scripts

SYNOPSIS
   osascript [-l language] [-s flags] [-e statement | programfile] [argument ...]

DESCRIPTION
   osascript executes the given script.  It was designed for use with AppleScript,
   but will work with any Open Scripting Architecture (OSA) language. 
   ...

You may also be interested in the osacompile utility.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.