Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Applescript Help
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Mark FX" data-source="post: 1341938" data-attributes="member: 211556"><p>If you are working in Applescript Editor, then save your main controller script as a bundle, from the save as menu, in the main File menu, this brings up the save dialog box, and there is a file format drop down list, select script bundle, and click save button.</p><p>Then back in the editor you will see a bundle contents button on the right side of the Run toolbar, click this button an it will show you the contents folder of your script bundle, you can create folders here with the smaller toolbar button, and name the folders anything you like, and you can also drag any script file or resources into any of the bundle folders.</p><p>Usually scripts are kept in the scripts folder inside the contents folder, not the resources folder, the resources folder is usualy reserved for icons, media, help files, ect.</p><p>But it does not really matter.</p><p></p><p>To find the external script files from your controller script, use the path to me command, and also the path to resource command, in your main controller script.</p><p></p><p>for example</p><p></p><p>[code]</p><p>set my_icon_file to path to resource"MyIcon.icns" in bundle (path to me) as alias</p><p>[/code]</p><p></p><p>hope this helps</p><p></p><p>Regards Mark</p></blockquote><p></p>
[QUOTE="Mark FX, post: 1341938, member: 211556"] If you are working in Applescript Editor, then save your main controller script as a bundle, from the save as menu, in the main File menu, this brings up the save dialog box, and there is a file format drop down list, select script bundle, and click save button. Then back in the editor you will see a bundle contents button on the right side of the Run toolbar, click this button an it will show you the contents folder of your script bundle, you can create folders here with the smaller toolbar button, and name the folders anything you like, and you can also drag any script file or resources into any of the bundle folders. Usually scripts are kept in the scripts folder inside the contents folder, not the resources folder, the resources folder is usualy reserved for icons, media, help files, ect. But it does not really matter. To find the external script files from your controller script, use the path to me command, and also the path to resource command, in your main controller script. for example [code] set my_icon_file to path to resource"MyIcon.icns" in bundle (path to me) as alias [/code] hope this helps Regards Mark [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Applescript Help
Top