New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Ľ Advice and insight from world-class Apple enthusiasts Ľ Exclusive access to members-only contests, giveaways and deals

Join today!

Start a Discussion

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Applescript Help

Post Reply New Thread Subscribe

Thread Tools

Member Since: Dec 17, 2011
Posts: 5
scriptinggeek12 is on a distinguished road

scriptinggeek12 is offline
Hi. I'm a beginning applescript dude and I'd like to know something about it. I'm making this widget that can do lots of stuff. Basically it's a simple application with a control panel and this control panel will have buttons like calculator or game. These buttons will link to external scripts so my code isn't all crammed into one script for easier reading of the code. I've developed all my components. Each thing will be in a different script. I have my main/control panel script that will link to all my other separate scripts. I'd like to know how to link these scripts to the resources folder of the script. Basically so that the users will only have access to the main script, which will link to the other scripts which would be located on the resources folder when you click on show package contents. Thanks and please help.
QUOTE Thanks
Mark FX

Mark FX's Avatar
Member Since: Aug 13, 2011
Location: West Sussex, UK
Posts: 180
Mark FX has a spectacular aura about

Mark FX is offline
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

set my_icon_file to path to resource"MyIcon.icns" in bundle (path to me) as alias
hope this helps

Regards Mark
QUOTE Thanks

Post Reply New Thread Subscribe

« Problem runnung c++ program | mutil-touch usb driver »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Starter
Last Post
Applescript help with serial port access ljimber OS X - Development and Darwin 0 06-24-2011 11:46 AM
help needed to link up buttons on HUD Window to Applescript nick_harambee OS X - Development and Darwin 0 09-30-2010 08:26 AM
newbie question on XCode 3.2: how to populate pop up buttons/link to applescript nickharambee OS X - Operating System 0 10-21-2009 07:10 AM
Logic Express and Applescript via GUI Scripting albertaurus Music, Audio, and Podcasting 0 04-09-2009 01:13 PM
[ANN] New comprehensive AppleScript book hanaan OS X - Development and Darwin 0 11-06-2004 07:28 PM

All times are GMT -4. The time now is 09:56 AM.

Powered by vBulletin
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.

Welcome to

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!

(4 digit year)

Already a member?