Re: What Changed Between 1.6 and 1.7?
Re: What Changed Between 1.6 and 1.7?
- Subject: Re: What Changed Between 1.6 and 1.7?
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 26 Apr 2002 08:08:43 -0700
On 4/26/02 7:10 AM, "Mickey" <email@hidden> wrote:
>
What changed between AppleScript 1.6 and 1.7 -- or maybe it's a
>
difference between Mac OS 9.1 and 9.2.2 -- to break this following
>
script segment?
>
>
>
try
>
set fileSyncLib to (load script file ":Timbuktu Scripts:(File Synch
>
Library)")
>
-- set fileSyncLib to (load script file "(File Synch Library)")
>
on error errorMessage number errorNumber
>
if errorNumber = -43 then
>
set errorMessage to errorMessage & return & return & "The file
>
(File Synch Library) may be missing from the Timbuktu Scripts folder."
>
end if
>
error errorMessage number errorNumber
>
end try
>
>
Under OS 9.1 and AppleScript 1.6, this works fine; the file "(File
>
Synch Library)" is found and opened. Under Mac OS 9.2.2 and
>
AppleScript 1.7, I get the File Not Found error. Has the manner of
>
addressing files or paths changed?
>
>
The script that contains the above segment is in the same folder as
>
the file it's trying to find, "(File Synch Library)" which is in the
>
"Timbuktu Scripts" folder.
>
>
Any ideas how to make this work? Help, please.
That little hack broke in AS 1.7. Chris Nebel says it was fixed in 1.8
(which isn't released yet for OS 9.) You can downgrade to AS 1.6 (there's
lots of other stuff broken in AS 1.7, so that's a good idea), or you can use
full file paths. I would not advise using the Finder to get the container,
although you could, because the Finder has lots of problems in AS 1.7 as
well.
Do this:
set myPath to (path to me as string)
set {tids, AppleScript's text item delimiters} to {AppleScript's text
item delimiters, {":"}}
set myFoldersPath to (text items 1 thru -2 of myPath) as string & ":"
set AppleScript's text item delimiters to tids
set fileSyncLibPath to (myFoldersPath & ":Timbuktu Scripts:(File Synch
Library)")
set fileSyncLib to (load script file fileSyncLibPath )
(P.S. Do you _really_ use parentheses as part of file's name like that? Is
your file really called "(File Synch Library)" ?? If that's a red herring,
get rid of them:
set fileSyncLibPath to (myFoldersPath & ":Timbuktu Scripts:File Synch
Library"
)
--
Paul Berkowitz
_______________________________________________
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.