Hi,
thanks SDPhantom. I see that I can print escape code for players, spell and other things if they are hyperlinks.
Lua Code:
local name = "|Hplayer:Axilea:1:WHISPER:Axilea|h[Axilea]|h"
print("print:" .. name) --> works
DEFAULT_CHAT_FRAME:AddMessage("addmsg: " .. name) --> works
SendChatMessage("sendchat: " .. name) --> FAIL !
But frankly I don't understand how to write in others players GUILD/OFFICER/RAID channel using the AddMessage.
Probably I make mistakes in understanding the 2 different functions:
AddMessage vs SendChatMessage
They both can write in my ChatFrames, but I don't understand IF AddMessage can write in other players GUILD/OFFICER/RAID/INSTANCE_CHAT like SendChatMessage does.
So I finish the addon using 2 different strings.
The first with that I use with a print() (when self output is chosen) is colored and the second for the other channels is not :-)
I attach the addon, autopsy, that is a minimal implementation of a death reports, if someone want to check it before the post to the public. Any comments are welcome.
Lua Code:
/autopsy testspell|testmelee
prints in the chosen channel a fake announce to test.
Thanks all again for your time.