如何从shell脚本调用一个AppleScript?

3

如何从shell脚本调用苹果脚本?

我有一个shell脚本,我在xcode项目的"Run Script"阶段使用它。在执行此shell脚本之前,我想调用另一个苹果脚本。

1个回答

2
你可以使用osascript实用程序。
以下是该实用程序的简介,使用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. 
   ...

您可能对osacompile实用程序感兴趣。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接