errors checking class of selected item
errors checking class of selected item
- Subject: errors checking class of selected item
- From: email@hidden
- Date: Mon, 9 Apr 2001 00:16:56 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.