Re: Scripts no longer work in 9.2.2
Re: Scripts no longer work in 9.2.2
- Subject: Re: Scripts no longer work in 9.2.2
- From: Christopher Nebel <email@hidden>
- Date: Thu, 6 Dec 2001 20:19:10 -0800
On Thursday, December 6, 2001, at 06:40 AM, Palmer, Will wrote:
Many of my scripts that refer to "constant" folders (i.e. System,
Extensions, etc) no longer work. I get this error "Finder got an error:
File
extensions folder wasn't found."
From this code:
tell application "Finder"
set infodate3 to get (info for extensions folder) as record
end tell
This is a known bug in AppleScript 1.7, I'm afraid. The problem is that
you're passing a Finder object specifier to "info for", and it's gagging
on it. Either of these will work:
tell application "Finder"
set infodate3 to info for (extensions folder as alias)
end
set infodate3 to info for (path to extensions folder) -- no "tell"
required.
(You don't need the "get" -- it's implied -- or the "as record", since
"info for" already returns one. They don't hurt anything, though.)
--Chris Nebel
AppleScript Engineering