Re: opening parent folder....
Re: opening parent folder....
- Subject: Re: opening parent folder....
- From: Ric Phillips <email@hidden>
- Date: Mon, 04 Mar 2002 16:33:09 +1100
On 27/2/02 9:16 AM, "fearghal" <email@hidden> wrote:
>
sorry if this is a resend - not sure if it made it through the first
>
time...
>
>
ok, i'm fairly new to applescript and have a questions for the veterans...
>
>
i have a folder called "INSTALLER" and inside that i have a folder called
>
"SCRIPTS", inside scripts i need to have an applescript that will open the
>
folder "INSTALLER"... to make matters complicated, the folder will not
>
always be called "INSTALLER" - it may have a different name and also the
>
location of the folder may vary.. this means that i have to get the path and
>
the name of the folder dynamically at the start of the script and then use
>
them to open the folder.
>
>
any advice?
>
>
thanks in advance!
>
>
fearghal
>
Look at the recent thread "Extracting to text [lecture]" which was about
techniques for parsing paths - to get parent grandparent etc.
To get the path to a script dynamically you use "get path to me".
But the gotcha here is that in a compiled script or text script "me" refers
to the script editor - unless you are using a more sophisticated editor. You
have to save the script as an application for "path to me" to return the
correct path.
If you want to fiddle around with it to get the hang of it start by writing
a little scriptette that only has the get path stuff and a display dialog or
two to show you what's happening.
BTW - "path to" is part of the "standard additions" extensions in your
scripting additions folder - you can use the open dictionary command to look
at the syntax and find out the returned data type.
Cheers,
Ric Phillips
Faculty Web Coordinator
Faculty of Humanities and Social Sciences
Latrobe University
Room HU3 324
Phone: 9479 2792
-----------------------------------------
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.