问题描述
我对 AppleScript 真的很陌生,所以这是一个真正的基本问题,但我在 AppleScript 参考资料中找不到答案或示例.指导.
I'm really new to AppleScript so this is a real basic question but I couldn't find the answer or an example in the AppleScript ref. guide.
我正在制作一个简单的脚本,我将其作为应用程序文件打包,在 AppleScript 编辑器中,我可以看到应用程序的 Bundle Contents
,其中有一个图标、一个描述文件和一个Scripts
文件夹.如何从脚本访问该内容以及如何访问 scripts 文件夹
中的脚本?
I'm making a simple script that I'll bundle as an application file, in the AppleScript Editor I can see the app's Bundle Contents
in which I have an icon, a description file and a Scripts
folder. How do I access that content from the script and how do I access the scripts inside the scripts folder
?
推荐答案
如果您将脚本保存为脚本包或应用程序包,您可以使用 path to resource
命令,例如:
If you save your script as a script bundle or as an application bundle you can use the path to resource
command, e.g.:
path to resource "description.rtfd"
另请参阅命令参考.
这篇关于如何获取应用程序包中的 Scripts 文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!