Re: Unicode text and the annoying relic called "styled text"
Re: Unicode text and the annoying relic called "styled text"
- Subject: Re: Unicode text and the annoying relic called "styled text"
- From: kai <email@hidden>
- Date: Fri, 24 Dec 2004 22:32:39 +0000
On Fri, 24 Dec 2004 10:47:46 -0800, Pat Stanford wrote:
So is there a way to get a "string" without style information onto the
clipboard?
We could use one (or a variation) of the methods discussed previously.
As mentioned, if the "string" might be either plain or styled/encoded
text, a try block or other means of handling plain text should be
considered:
-------------------------------
set t to "test" as Unicode text
try
set the clipboard to (t as record)'s «class ktxt»
on error number -1700 -- coercion failure
set the clipboard to t
end try
-------------------------------
set t to "test" as Unicode text
try
set the clipboard to (t as record as list)'s first string
on error number -1700 -- coercion failure
set the clipboard to t
end try
-------------------------------
set t to "test" as Unicode text
try
set the clipboard to (t as record)'s text as text
on error number -1700 -- coercion failure
set the clipboard to t
end try
-------------------------------
set t to "test" as Unicode text
set {text:t} to t as string
set the clipboard to t
-------------------------------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden