How do I get the Scripts folder in the application bundle?

感情迁移 提交于 2019-12-12 10:54:50

问题


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.

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?


回答1:


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"

Also see Commands Reference.



来源:https://stackoverflow.com/questions/2613142/how-do-i-get-the-scripts-folder-in-the-application-bundle

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!