Re: problem with paths
Re: problem with paths
- Subject: Re: problem with paths
- From: John MacDonald <email@hidden>
- Date: Thu, 11 Jan 2001 10:35:36 -0400
Doug, I get the same problem with 9.1. The Finder seems to have
special meanings for terms like 'scripting additions' even though it
isn't one of its 'special folders'.
I've seen the finder behave like this with other things too.
Sometimes it seems like it's third-party software.
Your best bet is to make a variable for the scripting additions
folder or your whole file.
set myScriptingAdditionsFolder to path to scripting additions as string
set myFile to myScriptingAdditionsFolder&"txtLib.library"
tell application "Finder"
if exists file myFile .....
Here's a handler I use. Note that it collects a global error message
so I can get all the bad news at once.
-----
on ScriptingAdditionInstalled(theScriptingAddition)
global errorMessage
set additionsFolder to path to scripting additions as text
tell application "Finder"
if exists file theScriptingAddition of folder
additionsFolder then
return true
else
set errorMessage to errorMessage & ,
"'" & theScriptingAddition & "'
scripting addition is not installed." & return & return
return false
end if
end tell
end ScriptingAdditionInstalled
------
-John