View Single Post
12-24-12, 01:51 AM   #7
gmarco
An Onyxian Warder
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 362
Hi,

thanks SDPhantom. I see that I can print escape code for players, spell and other things if they are hyperlinks.

Lua Code:
  1. local name = "|Hplayer:Axilea:1:WHISPER:Axilea|h[Axilea]|h"
  2. print("print:" .. name) --> works
  3. DEFAULT_CHAT_FRAME:AddMessage("addmsg: " .. name) --> works
  4. 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:
  1. /autopsy testspell|testmelee

prints in the chosen channel a fake announce to test.

Thanks all again for your time.
Attached Files
File Type: zip Autopsy-v0.1.zip (2.6 KB, 366 views)
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote