Re: What type is the finder selection?
Re: What type is the finder selection?
- Subject: Re: What type is the finder selection?
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 12 Aug 2002 20:54:04 -0700
On 8/12/02 8:31 PM, "Doug McNutt" <email@hidden> wrote:
>
But dropped items come through as class "alis" a four byte object. I am at the
>
three hour point trying to figure out what to do with them. Here's what I have
>
tried; nothing has yet worked:
>
>
on open (argList)
>
tell application "Finder"
>
display dialog argList
>
repeat with theAlias in argList
>
display dialog theAlias
>
set aTemp to theAlias as string -- ASLG page 305
>
set theTarget to aTemp as file -- class becomes "fss", file spec
>
!= file?
>
--set theTarget to theAlias as string -- class becomes TEXT
>
--set theTarget to file (theAlias as string) -- class becomes TEXT
>
--set theTarget to original item of theAlias as file -- just fails.
>
alis != alias I guess
>
set theType to class of theTarget
>
** SNIP - same as above
>
end repeat
>
beep
>
end tell
>
end open
on open (argList)
repeat with theAlias in argList
set filePath to theAlias as string
tell application "Finder"
activate
display dialog filePath
set theClass to class of item filePath
display dialog (theClass as string)
end tell
end repeat
end open
'item' is a superclass that covers everything: the Finder will still give
you the Finder class (folder, application file, document file, etc.). the
Finder can handle the full filepath form which you get by 'alias as string'
outside the Finder.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.