• 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: interesting failure in 9 setting creator of OSX file with
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: interesting failure in 9 setting creator of OSX file with


  • Subject: Re: interesting failure in 9 setting creator of OSX file with
  • From: Philippe GRUCHET <email@hidden>
  • Date: Fri, 17 Jan 2003 20:47:51 +0100

From: Charles Arthur <email@hidden>

If I understood your question, you wanted to write "CARO" as file creator instead of "" ?
The crash happened - in OS9, at least - when I performed that change on a file which has two dots in its name, created in OSX, where I'm trying to make it explicitly an Adobe Acrobat file (which has CARO as the file creator) for OS9.

Ah, I apologize for my incomprehension of your crash from OSX to OS9 !

I don't have X here at work so I'll leave it to you to see what happens to it if you try that in X.

Your script works really fine on X (10.2.3) with an "Untitled..pdf" file (2 dots, or more):

-- start of script
set thefile to alias "OSX:Users:philippe:Desktop:Untitled..pdf"
info for thefile
tell application "Finder"
set {thetype, thecreator} to {thefile's file type, thefile's creator type}
display dialog ("File name: " & thefile's name) & return & "File type: " default answer thetype
set thetype to result's text returned
display dialog "Creator: " default answer thecreator
set thecreator to result's text returned
set {thefile's file type, thefile's creator type} to {thetype, thecreator}
end tell
info for thefile
-- end of script

SE 2's Event Log History (events and results).
As you can see, in the first 'info for', file type and file creator are empty => missing value.
In the second 'info for', {file type:"PDF ", file creator:"CARO"}:

tell current application
info for alias "OSX:Users:philippe:Desktop:Untitled..pdf"
{name:"Untitled..pdf", creation date:date "vendredi 17 janvier 2003 18:34:26", modification date:date "vendredi 17 janvier 2003 18:42:23", icon position:{0, 0}, visible:true, size:1.8188E+4, folder:false, alias:false, name extension:"pdf", extension hidden:false, package folder:false, file type:"", file creator:"", displayed name:"Untitled..pdf", default application:alias "OSX:Applications:Texte:Acrobat Reader 5.0:Contents:MacOS:Acrobat Reader 5.0", locked:false, busy status:false, short version:"", long version:""}
end tell
tell application "Finder"
get file type of alias "OSX:Users:philippe:Desktop:Untitled..pdf"
missing value
get creator type of alias "OSX:Users:philippe:Desktop:Untitled..pdf"
missing value
get name of alias "OSX:Users:philippe:Desktop:Untitled..pdf"
"Untitled..pdf"
display dialog "File name: Untitled..pdf
File type: " default answer missing value
{text returned:"PDF ", button returned:"OK"}
display dialog "Creator: " default answer missing value
{text returned:"CARO", button returned:"OK"}
set file type of alias "OSX:Users:philippe:Desktop:Untitled..pdf" to "PDF "
"PDF "
set creator type of alias "OSX:Users:philippe:Desktop:Untitled..pdf" to "CARO"
"CARO"
end tell
tell current application
info for alias "OSX:Users:philippe:Desktop:Untitled..pdf"
{name:"Untitled..pdf", creation date:date "vendredi 17 janvier 2003 18:34:26", modification date:date "vendredi 17 janvier 2003 18:42:23", icon position:{0, 0}, visible:true, size:1.8188E+4, folder:false, alias:false, name extension:"pdf", extension hidden:false, package folder:false, file type:"PDF ", file creator:"CARO", displayed name:"Untitled..pdf", default application:alias "OSX:Applications:Texte:Acrobat Reader 5.0:Contents:MacOS:Acrobat Reader 5.0", locked:false, busy status:false, short version:"", long version:""}
end tell

(Double-click on the modified "Untitled..pdf" launches Acrobat 5 on OSX and not Acrobat Reader 4.0 on OS9.)

HTH

Kind regards,
Philippe Gruchet/SVM Mac
VNU Publications France
http://svmmac.vnunet.fr
_______________________________________________
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.

  • Prev by Date: Moving files
  • Next by Date: Re: Routines for review: Hex <-> String
  • Previous by thread: Re: interesting failure in 9 setting creator of OSX file with
  • Next by thread: Controlling Display with applescript?
  • Index(es):
    • Date
    • Thread