Re: info for not providing all information
Re: info for not providing all information
- Subject: Re: info for not providing all information
- From: Steve Suranie <email@hidden>
- Date: Thu, 07 Jul 2005 09:08:04 -0400
This might also help:
Here is the info returned for a file created in text editor:
{name:"nahcr_2005_pt2.txt", creation date:date "Monday, June 6, 2005 2:12:15
PM", modification date:date "Monday, June 6, 2005 2:12:15 PM", icon
position:{0, 0}, size:1.6103E+4, folder:false, alias:false, name
extension:"txt", extension hidden:false, visible:true, package folder:false,
file type:"file creator:"displayed name:"nahcr_2005_pt2.txt", default
application:alias "Macintosh HD:Applications:TextEdit.app:", kind:"Plain
text document", locked:false, busy status:false, short version:"", long
version:""}
Here is the info returned for a Dreamweaver file:
{name:"archive_home.html", creation date:date "Tuesday, January 7, 2003
11:26:56 AM", modification date:date "Friday, May 13, 2005 11:02:53 AM",
icon position:{-1, -1}, size:5.3503E+4, folder:false, alias:false, name
extension:"html", extension hidden:false, visible:true, package
folder:false, file type:"TEXT", file creator:"DmWr", displayed
name:"archive_home.html", kind:"Dreamweaver Document", locked:false, busy
status:false, short version:"", long version:""}
This problem seems to happen with only certain files, checking other DW
files did return the default application. Here's a DW file that worked:
{name:"dateResult.php", creation date:date "Monday, March 15, 2004 12:51:21
PM", modification date:date "Monday, March 15, 2004 12:51:21 PM", icon
position:{0, 0}, size:1793.0, folder:false, alias:false, name
extension:"php", extension hidden:false, visible:true, package folder:false,
file type:"TEXT", file creator:"DmWr", displayed name:"dateResult.php",
default application:alias "Macintosh HD:Applications:Macromedia Dreamweaver
MX 2004:Dreamweaver MX 2004:", kind:"PHP: Hypertext Preprocessor (PHP)
document", locked:false, busy status:false, short version:"", long
version:""}
Regardless, it still leaves me with the same problem, I need this to be a
universal file reader so if some information isn't provided I should be able
to determine that and display NULL or UNKNOWN or something similar for the
user.
On 7/7/05 8:58 AM, "Steve Suranie" <email@hidden> wrote:
> 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
>
> _______________________________________________
> 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
>
_______________________________________________
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