Re: opening parent folder....
Re: opening parent folder....
- Subject: Re: opening parent folder....
- From: "Marc K. Myers" <email@hidden>
- Date: Tue, 26 Feb 2002 22:27:54 -0700
- Organization: [very little]
>
From: "fearghal" <email@hidden>
>
To: <email@hidden>
>
Subject: opening parent folder....
>
Date: Tue, 26 Feb 2002 11:58:22 -0800
>
>
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.
If the script is an applet, "path to me" returns an alias reference to
the script's file.
set myFile to (path to me) as text
set od to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set myFldr to (items 1 thru -2 of (get text items of myFile)) as text
set AppleScript's text item delimiters to od
tell application "Finder"
activate
open alias myFldr
end tell
or even easier
set myFile to (path to me)
tell application "Finder"
activate
open container of myFile
end tell
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[2/26/02 10:27:39 PM]
_______________________________________________
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.