• 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: Is: Setting File & Creator Type access error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is: Setting File & Creator Type access error


  • Subject: Re: Is: Setting File & Creator Type access error
  • From: Philip Aker <email@hidden>
  • Date: Thu, 2 Jul 2009 02:13:11 -0700

On 2009-07-01, at 22:25:56, Johnny AppleScript wrote:

On 7/1/09 10:53 PM, "Philip Aker" <email@hidden> wrote:

What is bad here is that between System Events, info for, and Finder, there
are different non-transferrable terms for 'creator type', when in fact they
all refer to the same 32 bits of the low level FSCatalogInfo.finderInfo

And while you all have fun chewing on that, I'm merely pleased this works,
too:

tell application "Finder" to tell (document file f) to set {file type,
creator type} to {"DISH", "DHAT"}

As Henny Youngman said, if you can't say it in one line...

That's for jokes and nutshell philosophy.

For AppleScript, if you click on the Event Log button at the bottom right of a Script Editor window and then run the above one liner, you'll see something like:

tell current application
path to desktop as text
"zarlino:Users:pma:Desktop:"
end tell
tell application "Finder"
set file type of document file (alias "zarlino:Users:pma:Desktop:test.txt") to "DISH"
"DISH"
set creator type of document file (alias "zarlino:Users:pma:Desktop:test.txt") to "DHAT"
"DHAT"
end tell


As you can see, the advantages of a one liner insofar as AppleScript execution goes, are none.


Philip Aker echo email@hidden@nl | tr a-z@. p-za-o.@

Democracy: Two wolves and a sheep voting on lunch.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Is: Setting File & Creator Type access error
      • From: Johnny AppleScript <email@hidden>
References: 
 >Re: Is: Setting File & Creator Type access error (From: Johnny AppleScript <email@hidden>)

  • Prev by Date: Re: Find index of list to find item in another list
  • Next by Date: Re: Is: Setting File & Creator Type access error
  • Previous by thread: Re: Is: Setting File & Creator Type access error
  • Next by thread: Re: Is: Setting File & Creator Type access error
  • Index(es):
    • Date
    • Thread