Re: info for not providing all information
Re: info for not providing all information
- Subject: Re: info for not providing all information
- From: kai <email@hidden>
- Date: Thu, 7 Jul 2005 14:37:07 +0100
On Thursday, July 7, 2005, at 01:58 pm, Steve Suranie wrote:
Is there a way to check which information has been returned before
trying to
access that information - something like:
if default application of thisFileInfo then
end if
(I tried this and it didn't work, said default application wasn't a
boolean)
There's a slight problem here, Steve. If a value for 'default
application' isn't returned, we can't really refer to it in order to
check its (non-existent) value. However, since we're working with
records, we may be able to utilise a little concatenation trick
instead...
Try something like this:
set infoToReturn to {}
set thisFilePath to choose file with prompt "Select a file to convert."
copy (thisFilePath as string) & "::" to end of infoToReturn
set thisFileInfo to (info for thisFilePath) & {default
application:missing value}
copy name of thisFileInfo & "::" to end of infoToReturn
copy creation date of thisFileInfo & "::" to end of infoToReturn
copy modification date of thisFileInfo & "::" to end of infoToReturn
copy name extension of thisFileInfo & "::" to end of infoToReturn
copy kind of thisFileInfo & "::" to end of infoToReturn
copy default application of thisFileInfo & "::" to end of infoToReturn
return infoToReturn
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden