View Single Post
09-23-17, 12:00 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Lua Code:
  1. local Frame = FCF_OpenNewWindow("chat window title")
  2. ChatFrame_RemoveAllMessageGroups(Frame)
  3. ChatFrame_RemoveAllChannels(Frame)
  4. ChatFrame_AddMessageGroup(Frame, "WHISPER")
  5. ChatFrame_AddMessageGroup(Frame, "GUILD")
  6. ChatFrame_AddChanngel(Frame, "Trade")

This will insert a new frame, it'll be whatever index the game assigns it to.
If you want to specifically do ChatFrame3, replace the first line with this:

Lua Code:
  1. local Frame = ChatFrame3

A full example of how I set up my chat frames on first login:
https://github.com/p3lim-wow/Inomena...aster/chat.lua

There's some other things in there that helps facilitate it, which you can ignore, the whole addon is about setting up on fresh characters (chat, cvars, bindings, scaling).
  Reply With Quote