• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: info for not providing all information
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: info for not providing all information


  • Subject: Re: info for not providing all information
  • From: Yvan KOENIG <email@hidden>
  • Date: Thu, 7 Jul 2005 16:20:23 +0200


Le 7 juil. 2005 , à 14:58, Steve Suranie a écrit :

I have a script (which I am using in RealBasic) that gets the info for a
selected file. When I select HTML files created in Dreamweaver the script
gives me an error message saying it cannot get the default application.


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)

Here's my script:


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

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


It's right, default application is not a boolean, it is a pathname.

One track maybe something like that:


try tell theDefaultApplication to open thisFilePath on error display dialog "It seems that the default app is not available" end try

Yvan KOENIG
_______________________________________________
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


References: 
 >info for not providing all information (From: Steve Suranie <email@hidden>)

  • Prev by Date: Re: info for not providing all information
  • Next by Date: Xpost FMserver7 ScriptProperties
  • Previous by thread: Re: info for not providing all information
  • Next by thread: Re: creating text file under Tiger 10.4.1?
  • Index(es):
    • Date
    • Thread