• 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: String to multiple-item list coercion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String to multiple-item list coercion


  • Subject: Re: String to multiple-item list coercion
  • From: Paul Skinner <email@hidden>
  • Date: Thu, 26 Sep 2002 16:33:03 -0400

Cool Arthur! That's very close to what I was trying to do with the
Unicode conversion thread that I botched the other day. So close I had
to try using it there...

tell application "Mail"
set unicodeString to the content of the first item of (get the
selection)
end tell
class of unicodeString -->Unicode text

set {text:plainText} to (text of unicodeString) as text
plainText -->plain text!

--
Paul Skinner



On Thursday, September 26, 2002, at 02:41 PM, Arthur J. Knapp wrote:

>> Date: Thu, 26 Sep 2002 13:12:32 +0100
>> Subject: Re: String to multiple-item list coercion
>
>>>> set {day:a, month:b, year:c} to date "Sunday, September 1, 2002
>>>> 12:00:00am"
>>>> return {a, b, c}
>>>> --> {1, September, 2002}
>
> Testing various aspects of the above made me realize that one can do
> without the << >> characters in the styled text to plain text
> conversion:
>
> set styled_text to the clipboard -- assuming styled text on
> clipboard
>
> set {text:plain_text} to styled_text
>
> plain_text --> yup, plain text
>
> Actually, this is far nicer than the "<<class ktxt>> ... as record"
> thing
> because it doesn't error on plain text:
>
> set { text : x } to styled_text -- x == plain text
> set { text : y } to plain_text -- y == plain text
>
>
>
> P.S. set a to {1, 2, 3}
>
> set {length:len, rest:res, reverse:rev} to a
>
> len --> 3
> res --> {2, 3}
> rev --> {3, 2, 1}
>
> Fun, but not apparently useful. ;-)
>
>
> { Arthur J. Knapp, of <http://www.STELLARViSIONs.com>
> a r t h u r @ s t e l l a r v i s i o n s . c o m
> }
_______________________________________________
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.

  • Follow-Ups:
    • Re: String to multiple-item list coercion
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: String to multiple-item list coercion (From: "Arthur J. Knapp" <email@hidden>)

  • Prev by Date: compiler stupidity [was Re: Interesting... AppleScript X ??]
  • Next by Date: Re: String to multiple-item list coercion
  • Previous by thread: Re: String to multiple-item list coercion
  • Next by thread: Re: String to multiple-item list coercion
  • Index(es):
    • Date
    • Thread