API ScrollingMessageFrame AddMessage

104,670pages on
this wiki
Add New Page
Talk0 Share
Widget API ← ScrollingMessageFrame < AddMessage

Outputs text to a local MessageFrame, with optional color id.- Updated in 2.4.2


Parameters Edit

Arguments Edit

(String text, Number red, Number green, Number blue, Number id, Boolean addToStart)
The string message to output
The intensity of the red component. A number between 0.0 and 1.0
The intensity of the green component. A number between 0.0 and 1.0
The intensity of the blue component. A number between 0.0 and 1.0
A number that classifies the line of text, for later changing the color
Boolean - Set to true to add the message to the start of the MessageFrame as if it was the first printed message - New in 2.4.2.

Returns Edit


Example Edit

DEFAULT_CHAT_FRAME:AddMessage("Testing", 1.0, 0.0, 0.0);

Outputs "Testing" on a single line in your default chat window -- in red.

DEFAULT_CHAT_GLOBAL:AddMessage("AddOn Loaded!", 0.0, 1.0, 0.0, nil, true);

Outputs "AddOn Loaded!" at the start of your default chat window -- in green.

Escape SequencesEdit

It is also possible to control the text of parts of lines in the MessageFrame with escape sequences in text.

Set colorEdit


|cAARRGGBB  colored text  


|cFFFF0000This Will Be In Red

Reset colorEdit


|cAARRGGBB  colored text  |r  uncolored text


|cFF00FF00In Green|rDefault Color

See alsoEdit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki