• 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
Getting around Log's limitations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting around Log's limitations


  • Subject: Getting around Log's limitations
  • From: Gil Dawson <email@hidden>
  • Date: Mon, 8 May 2017 12:30:34 -0700

set RList to {}

copy {a:0, b:1, c:2} to end of RList
copy {a:1, b:2, c:3} to end of RList

log "RList=" & TextOf(RList)

on TextOf(aVariable)
try
return "" & aVariable
on error errm
log errm
if errm begins with ¬
"Can’t make " and errm ends with " into type Unicode text." then ¬
return text 12 through -25 of errm
return "item of class " & (class of aVariable)
end try
end TextOf

-->
(*Can’t make {{a:0, b:1, c:2}, {a:1, b:2, c:3}} into type Unicode text.*)
(*RList={{a:0, b:1, c:2}, {a:1, b:2, c:3}}*)

Be careful: the "’" in "can’t" isn't what you'd type.  

Copy it from the error message so that it'll match.

--Gil

 _______________________________________________
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

  • Prev by Date: Re: Select next bookmark in a Pages doc
  • Next by Date: I want to delete 'Mail' mailboxes.
  • Previous by thread: Saving reference movie in QuickTime 7 Pro. What descriptors should I use?
  • Next by thread: I want to delete 'Mail' mailboxes.
  • Index(es):
    • Date
    • Thread