Re: weird path to me error
Re: weird path to me error
- Subject: Re: weird path to me error
- From: daniel <email@hidden>
- Date: Wed, 19 Jan 2005 20:16:03 -0800
Robert - was your older script perhaps saved as a script bundle? In
that case I think your code as listed below *would* succeed, though it
would put the prefs file inside the script bundle's directly. Since
there's a colon at the end, appending a filename specifies a legal path
(though an odd choice of location).
Save a script as a bundle and notice that the "path to me" result
refers to the root-folder of the bundle. If the script is saved as a
non-bundled script, it will refer to just the file itself (no colon at
the end).
Daniel
On Jan 19, 2005, at 2:18 PM, Robert Poland wrote:
When I run this snippet as part of an old script it works fine.
But when run as a new script (saved in the correct folder) I get the
indicated error.
I find it odd that the file name and the script name are run together.
Is that a clue? I have tried adding in a colon but that didn't help.
The old script was created in January of 2004. Has something changed?
set myPath to path to me
set myPrefs to "AwakeTimes"
read file ((myPath as string) & myPrefs)
set myData to result
myData
--> "File iMac HD:Library:Scripts:Universal
Scripts:TimeTestAwakeTimes wasn't found."
Tia,
--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden