• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: problem with paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >problem with paths (From: "email@hidden" <email@hidden>)

  • Prev by Date: RE: Stay Open
  • Next by Date: Standard Additions in 9.1
  • Previous by thread: problem with paths
  • Next by thread: Standard Additions in 9.1
  • Index(es):
    • Date
    • Thread