Re: Check folder visibility
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