Reputation: 31
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?
Upvotes: 3
Views: 687
Reputation: 104698
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.
Upvotes: 2