Hello all,
I’m sorry for asking what I imagine is a pretty basic question. I’ve looked for the answer in several sites and had no luck.
I’m curious how to make a script that can do various things to files/folders/disks based on what the object is. Specifically I’m trying to make a script that will take a selection of multiple things(disks and files), and eject the disks and move the files to the trash. I have this:
tell application "Finder"
set thestuff to selection
repeat with i from 1 to the number of items in thestuff
set this_item to item i of thestuff
if the kind of this_item is disk then eject this_item --I know this is bad/wrong
if the kind of this_item is file then move this_item to the trash --I know this is bad/wrong
end repeat
end tell
I don’t know how to make applescript get the kind of an item. Is what I’m trying to do possible?
Many thanks,
Casey Koons
Model: iBook G4
AppleScript: 1.10.3
Browser: Firefox 1.5.0.1
Operating System: Mac OS X (10.4)