Re: Path to me (was: "open" command without full path (OS 9))
Re: Path to me (was: "open" command without full path (OS 9))
- Subject: Re: Path to me (was: "open" command without full path (OS 9))
- From: Kai <email@hidden>
- Date: Thu, 27 Feb 2003 02:48:32 +0000
on Tue, 25 Feb 2003 13:47:47 -0500, Paul Skinner <email@hidden>
wrote:
>
You can use the command 'path to me' in a script and if run as an
>
application (not in an editor) it will return the container that it is
>
in. You could take that and append the filename you know is in the same
>
directory and have a path to it.
>
>
display dialog (((path to me) as string) & "filename.ext")
Does 'path to me' really return a container for you, Paul?
This is how it's always worked here: The command 'path to me' returns an
alias of the application running the script, be it Script Editor, Outlook
Express, FileMaker Pro, etc. - or the script itself (when saved as an
application).
So to open a file that's located in the same folder as your saved applet,
you first need to perform minor surgery on the file path before adding the
target file's name - something like this:
=================================================
tell application "Finder" to open file [NO-BREAK]
(((path to me)'s folder as string) & "target file")
=================================================
--
Kai
_______________________________________________
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.