Need a simple script to open a folder that is the child of a parent

Hi,
I need a simple applescript that will open a folder that is a child of the parent of the ‘current’ script directory. This is to use in conjunction with a flash application. The Flash app can only call an applescript in a folder named ‘fscommand’. I want the script it calls to be able to work out where the script is running from, go up a level (the fscommand container) and open a folder that resides inside another folder at the parent level.

here is an tree like example:

masterFolder
–fscommand
----theAppleScript
–anotherFolder
----anotherFolder
--------openThisFolder

My absolute ideal would be to find out if it is possible to fee a variable into a single Applescript that is able to then be used to choose which folder is opened. If not I have to create many scripts.

thanks for the help.

The first part is pretty easy just look at the path to me statement.

As for the your ideal scenario can you elaborate because I don;t follow what you were saying.

Thanks James,
I am creating a flash ‘menu’ that is to help users open folders on what will be a DVD. There are about 240 folders in total. Each folder has a numeric based name that is stored in the flash application. I have just been reading some more about this and found out that my ‘ideal’ is probably not possible. This is because there doesn’t seem to be any way to pass a variable to an applescript when you ask it to open. If in fact you can pass a variable, then of course Flash would also need to provide the means to do this which it seems it most likely wouldn’t. Flash only provides the ability to call an external script by it’s name, no other parameters exist from what I can tell in the function that does the call.

This leaves me with probably needing to create 240 odd applescripts, each saved with a similar script that knows the folder that is to be opened when any one applescript is called.

Does this make sense?

I will be honest that I don’t know jack about flash, but if I’m following you there might be a work around… might Can you call a shell script from flash?

I have just looked into this some more. It would seem that shell scripts are not supported from Actionscript… probably would be a security nightmare. There is a ‘commercial’ application that is selling a bunch of applescripts that will call a file in the same fscommand directory. I think this is just one of those limitations and I have to work around it. I think it is becoming the case that I am happy to create many scripts if only I could get the relative directory calls sussed out (I don’t know jack about applescript :slight_smile:

Any help with producing an Applescript that is able to open the ‘openThisFolder’ directory tree example below would still be much appreciated. The script simply needs to reside in the ‘fscommand’ directory and request that Finder opens the ‘openThisFolder’ by relative means. This is for a DVD based project and ‘masterFolder’ represents the DVD. ‘fscommand’ is simply the name of a folder that is required by Flash to contain any applescripts that Flash is permitted to call.

masterFolder
–fscommand
----theAppleScript
–anotherFolder
----anotherFolder
--------openThisFolder