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
Scripting and changing typeface styles
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.
<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.
- zaudragon
- Growl Team
- Posts: 1852
- Joined: Sat Dec 04, 2004 5:05 am
- Location: Kensington, CA, USA
- Contact:
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.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.
So when I use
Code: Select all
/html{<HTML><FONT COLOR="#FF0000">String</FONT></HTML>}String
back.