首页 > 解决方案 > 从 AppleScript 应用程序中运行 AppleScript 脚本

问题描述

我正在将此代码实现到前几天制作的 AppleScript 应用程序中,但它似乎不起作用。我正在尝试运行另一个 AppleScript 脚本。

set filescript to (path to resource "file creator.scpt" in directory "Scripts")
run script (path of filescript)

错误说它无法获得别名的类PPTH。

标签: applescript

解决方案


这是我目前的做法:

run script alias (((path to home folder) as string) & "projects:Another Script.applescript")

所以在这个例子中,我要运行的另一个脚本是在~/projects/Another Script.applescript. 我使用它在另存为文本或应用程序的脚本中运行另一个 applescript。


推荐阅读