• 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
Spotlight comments-- odd behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Spotlight comments-- odd behavior


  • Subject: Spotlight comments-- odd behavior
  • From: Evan Schoffstall <email@hidden>
  • Date: Sat, 30 Jul 2011 12:42:08 -0400

This is some odd applescriptObjC behavior.
Say I have the following code

set myFilePath to "Macintosh HD:Users:mySelf:Desktop:file.txt" as text

tell application "Finder" to set comment of myFilePath to "testing"


and yet, the code returns:


Can’t set «class comt» of "Macintosh HD:Users:mySelf:Desktop:file.txt" to "testing". (-10006)


However, if we have the following code:


set tFile to choose file

log tFile

set tComment to text returned of (display dialog "Please enter the comment below" default answer "Comment Here")

tell application "Finder" to set comment of tFile to tComment


The code logs tFile as


<NSAppleEventDescriptor: 'alis'($000000000132000200000C4D6163696E746F7368204844000000000000000000000000000000C789A404482B0000035A38310C43726F77426172322E747874000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035A3836CA3E41515445585400000000FFFFFFFF00004920000000000000000000000000001000080000C789EA540000001100080000CA3E79910000000E001A000C00430072006F00770042006100720032002E007400780074000F001A000C004D006100630069006E0074006F007300680020004800440012003055736572732F4576616E5363686F66667374616C6C2F4465736B746F702F53706163652F43726F77426172322E747874001300012F00001500020016FFFF000000000000$)>


and does exactly what I want it to,


but I don't want to choose a file! What in goodness gracious? I tried as alias and as POSIX file and as |path|()'s |URL|() and on and on.

Nothing works execpt choose file and I have no idea why? Please help? 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Spotlight comments-- odd behavior
      • From: Shane Stanley <email@hidden>
  • Prev by Date: [ANN] AppleScriptObjC Explorer 2
  • Next by Date: Re: Spotlight comments-- odd behavior
  • Previous by thread: [ANN] AppleScriptObjC Explorer 2
  • Next by thread: Re: Spotlight comments-- odd behavior
  • Index(es):
    • Date
    • Thread