errors checking class of item in Finder
errors checking class of item in Finder
- Subject: errors checking class of item in Finder
- From: email@hidden
- Date: Thu, 12 Apr 2001 21:06:41 EDT
If the script containing the following snippet is invoked via OSA Menu it
returns a -1753 error
set ,
theseItems to every item in selection
repeat with aItem in theseItems
set ,
aItemClass to the class of aItem as string
set ,
aItemName to the name of aItem as string
if aItemClass is "folder" then
set ,
aItemPath to the folder of aItem as string
end if
if aItemClass is "disk" then -- a disk image most of the time
set ,
aItemPath to ("") as string
end if
end repeat
If ran from inside Smile it works fine, what's the difference?
BTW
The script that contains the above code creates a new folder inside each item
in theseItems named:(somePrefix & aItemName), thats why I need the item
reference as a string.