Re: Text without formatting (OS 9.1)
Re: Text without formatting (OS 9.1)
- Subject: Re: Text without formatting (OS 9.1)
- From: Devon and Cornwall <email@hidden>
- Date: Wed, 28 Feb 2001 23:20:55 -0800
At 8:04 PM -0700 2/28/01, John McElwain wrote:
>
Try
>
--something which will fail
>
on error errMsg
>
end try
>
>
The text returned is formatted as black 12 pt geneva. For my FM layout, I
>
need white Helvetica 10 pt font. Prior to the improved unicode capabilities
>
of AS under OS 9.1, the trick below would put unformatted text into the FM
>
cell. But now (9.1 AS 1.5.5), the text is formatted (black 12 pt geneva),
>
and the error messages does not appear as I would like on my layout.
>
>
----------
>
g3pb <email@hidden> wrote
>
>
> worked under 9.1 AS 1.5.5, FMp 5
>
>
>
>
>
>
>
>> set cell "Error Message" to (errorMes as Unicode text) as text
I have been playing around with this, because I often use AppleScript
variables to remove style from text on the clipboard. I have never had
a problem (until now) with styled text in variables. I would like to
know too how to remove text style from a text variable.(?)
Also on OS 9.1
Cornwall
try
tell application "Finder" to open file "Bogus:Fake"
on error errMsg
end try
--set errMsg to errMsg as Unicode text --uncommenting this line
--removes the color info but not the font and size info
set errMsg to errMsg as text
variableToClip(errMsg)
on variableToClip(myText)
tell application "Finder"
if not frontmost then
set thisFrontApp to every process whose frontmost is true
activate
set the clipboard to myText
activate thisFrontApp
else
set the clipboard to myText
end if
end tell
end variableToClip
-->Finder got an error: Can't get file "Bogus:Fake".
--styled text with the "file "Bogus:Fake"" part in colored text