我如何在应用程序包中的脚本文件夹? [英] How do I get the Scripts folder in the application bundle?
问题描述
我真的很新的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,我可以看到应用程序的捆绑内容
中,我有一个图标,说明文件和脚本
文件夹中。如何访问从脚本的内容以及如何访问里面的脚本脚本文件夹
?
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
?
推荐答案
如果您的脚本保存为一个脚本包或应用程序绑定您可以使用路径资源
命令,例如:
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"
另请参阅<一个href=\"http://developer.apple.com/mac/library/DOCUMENTATION/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html\">Commands参考。
这篇关于我如何在应用程序包中的脚本文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!