applescript - 从 AppleScript 应用程序中运行 AppleScript 脚本
问题描述
我正在将此代码实现到前几天制作的 AppleScript 应用程序中,但它似乎不起作用。我正在尝试运行另一个 AppleScript 脚本。
set filescript to (path to resource "file creator.scpt" in directory "Scripts")
run script (path of filescript)
错误说它无法获得别名的类PPTH。
解决方案
这是我目前的做法:
run script alias (((path to home folder) as string) & "projects:Another Script.applescript")
所以在这个例子中,我要运行的另一个脚本是在~/projects/Another Script.applescript
. 我使用它在另存为文本或应用程序的脚本中运行另一个 applescript。
推荐阅读
- android - Flutter中如何正确对齐左右子元素
- r - 从测试数据的预测中获取 RMSE 和 R2 时的问题
- kubernetes - uuidv4 在 Kubernetes 中发生新部署时更新
- debugging - google script 你可以使用 IDE 调试器单步调试一个调用的 google 脚本库吗
- javascript - 当我在 javascript 中使用自己的 sleep() 函数时,我使用快速排序算法的递归排序函数不起作用
- c++ - 我什么时候必须在 Qt 中包含 moc*.cpp?
- java - 构造函数有什么问题?
- express - Heroku 错误=H13“连接关闭而没有响应”状态=503
- arrays - 满足条件的前 5 个单元格的 SUMIF,带有移动窗口
- apache-kafka-streams - Spring Cloud Stream 的 Apache Kafka