Page 1 of 1
Scripting and changing typeface styles
Posted: Fri Jun 03, 2005 6:21 pm
by KiltOtter
Question for the scripters here...
I'd like to know how to add the likes of a colour change to a letter or series of letters in a string, so that when the string is sent to the user as a message the colours are also there.
eg. if {RED} is for red colour on/off and so on, and the text Hello! is sent to the script, then the script should return {RED}Hello!{RED}.
Thanks in advance.
Kilty
Posted: Fri Jun 03, 2005 7:58 pm
by noleli
You have to use HTML. It needs some coercing, as HTML in IMs is, shall we say, special. I think it needs to be all caps, and include the <HTML> and </HTML> tags. So IIRC (and this is untested...):
<HTML><FONT COLOR="FF0000">String</FONT></HTML>
Maybe you're not even supposed to have the quotes. I don't remember. I suggest going into official AIM, setting an away message with color in it, and using AppleScript to return the raw source of the message. That should show you how it's done, if I've got it wrong.
Posted: Fri Jun 03, 2005 11:42 pm
by zaudragon
noleli wrote:You have to use HTML. It needs some coercing, as HTML in IMs is, shall we say, special. I think it needs to be all caps, and include the <HTML> and </HTML> tags. So IIRC (and this is untested...):
<HTML><FONT COLOR="FF0000">String</FONT></HTML>
Maybe you're not even supposed to have the quotes. I don't remember. I suggest going into official AIM, setting an away message with color in it, and using AppleScript to return the raw source of the message. That should show you how it's done, if I've got it wrong.
Well in my Raw HTML script (
http://trac.adiumx.com/wiki/EnteringHTML ) I just have it return what is typed in… and it displays it.
So when I use
Code: Select all
/html{<HTML><FONT COLOR="#FF0000">String</FONT></HTML>}
I get
String
back.
Posted: Sat Jun 04, 2005 1:15 am
by KiltOtter
Thanks, have been trying, some minor issues, so will have to think how to get around them. The concept is sound, just gives some strange results.