• 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: Check folder visibility
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check folder visibility


  • Subject: Re: Check folder visibility
  • From: Victor Yee <email@hidden>
  • Date: Thu, 16 Aug 2001 22:40:52 -0400

This is interesting:

on itemExists(pathStr)
try
tell application "Finder" to (exists item pathStr)
on error errMsg number errNum
return {errMsg, errNum}
end try
end itemExists

-- exists
set a to ("" & (path to startup disk as string) & "System Folder:")

-- doesn't exist
set b to ("" & (path to startup disk as string) & "nil")

-- exists, but invisible
set c to ("" & (path to startup disk as string) & "Icon" & return)

{itemExists(a), itemExists(b), itemExists(c)}
-->{true, false, {"because *0x//*the original item cannot be found", 32768029}}

So it seems that if you catch the error, the Finder's exist command can also tell you if the item is visible?

Victor


  • Prev by Date: Re: Check folder visibility
  • Next by Date: Re: Ordinal Numbers (1st, 2nd, etc.)
  • Previous by thread: Re: Check folder visibility
  • Next by thread: Check folder visibility
  • Index(es):
    • Date
    • Thread