View Single Post
11-05-18, 03:50 AM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,933
The code you have should clear all the main frames including the combat log ( ChatFrame2 ).

For the temporary chat frames to get included this may be a better option.


FCFDock_GetChatFrames(dock) to receive a list of windows that are docked

DOCKED_CHAT_FRAMES is the table containing the docked chat frames.

So,

GENERAL_CHAT_DOCK.DOCKED_CHAT_FRAMES or
FCFDock_GetChatFrames(GENERAL_CHAT_DOCK) should get you the table containing the different chat frames in the chat frame box.

If you also have undocked windows that you want to access then this may be the better option.

Lua Code:
  1. function WorkOnAllChatFrames()
  2.     local chatFrame, chatTab, conversationIcon;
  3.     for _, chatFrameName in pairs(CHAT_FRAMES) do
  4.        local frame = _G[chatFrameName];
  5.        chatFrame = frame;
  6.        chatTab = _G[chatFrame:GetName().."Tab"];
  7.        .... Do your stuff here
  8.     end
  9. end

Also, to clear the tab of text simply set the Window Name to "". window:clear() will clear the chat frame window of its messages instead.

SetChatWindowName(i, "")
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818

Last edited by Xrystal : 11-05-18 at 03:53 AM.
  Reply With Quote