Not signed in (Sign In)
    •  
      CommentAuthormeow
    • CommentTimeOct 14th 2007
     
    as far as I can work out currently most of the chat output, such as the results from an end of a scan use this
    <World of Warcraft>\Interface\AddOns\Auc-Advanced\CoreUtil.lua:37
    function lib.Print(...)
    local output, part
    for i=1, select("#", ...) do
    part = select(i, ...)
    part = tostring(part):gsub("{{", "|cffddeeff"):gsub("}}", "|r")
    if (output) then output = output .. " " .. part
    else output = part end
    end
    DEFAULT_CHAT_FRAME:AddMessage(output, 0.3, 0.9, 0.8)
    end


    anyway.. the bit that looks like people would like some control over is
    line 45: DEFAULT_CHAT_FRAME:AddMessage(output, 0.3, 0.9, 0.8)

    more of whether it prints & where it prints.

    maybe a popup frame or one of the commands that lets you pick a chat channel ?
    •  
      CommentAuthordinesh
    • CommentTimeOct 14th 2007
     
    i thought there was a ticket for this already, but can't find it now. feel free to add one.

    note that there is already a way to disable the summary report.
    •  
      CommentAuthormeow
    • CommentTimeOct 14th 2007
     
    I can't find the location to disable it... I did find how to enable/disable other end of scan messages/sounds but that wasn't the same thing.

    at the moment I was researching the usage of DEFAULT_CHAT_FRAME:AddMessage
    but not getting very far... the places I've looked either assume the reader already knows or is just using it to illustrate some other point.
    argument structure etc, and other stuff related to DEFAUT_CHAT_FRAME


    http://www.wowwiki.com/World_of_Warcraft_API
    AddChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel visible in a specific ChatFrame.
    AddChatWindowMessages - Adds a messaging group to the specified chat window.

    was giving me some ideas ... but I'd prefer to know where a comprehensive reference guide of the WoW inbuilt functions etc

    http://www.lua.org/manual/5.1 is ok... but its too generalized .. since it doesn't cover WoW specific details.

    http://forums.worldofwarcraft.com/thread.html?topicId=64187212&sid=1 has
    Interface AddOn Kit
    The 2.0 Live Interface AddOn Kit is available for download found here:
    http://ftp.blizzard.com/pub/WoW/other/InterfaceAddOnKit_Win.zip
    http://ftp.blizzard.com/pub/WoW/other/InterfaceAddOnKit_OSX.zip

    The Burning Crusade BETA Interface AddOn Kit can be found here:
    http://www.worldofwarcraft.com/downloads/expansion-bc/addonkit.zip

    Significant Changes
    * WoW 2.0 has upgraded to Lua 5.1.1 as it provides a number of benefits (notably incremental garbage collection and efficient varargs). There ARE some incompatible changes from Lua 5.0, authors should read http://www.lua.org/manual/5.1


    http://www.wowwiki.com/Lua_functions .. doesn't list what I was looking for either

    .. hmm ok I found in

    <World of Warcraft>\Blizzard Interface Data (enUS)\FrameXML\ChatFrame.lua
    DEFAULT_CHAT_FRAME = ChatFrame1;

    so I am still looking for where AddMessage is defined.
    hmm maybe
    AddMessage(string, info.r, info.g, info.b, info.id);
    - string is looks self explanatory - and looks like the only required parameter
    - info.r, info.g, info.b - looks like red green blue colour values - each 0.0 to 1.0 values - optional
    - info.id :confused: another number but I haven't worked out how its used. - optional

    (ok I am thinking out loud)
  1.  
    You are correct, DEFAULT_CHAT_FRAME == ChatFrame1. If you call ChatFrame1:GetObjectType() you will get the response of "ScrollingMessageFrame". Once you know that you can consult the Widget API section of wowwiki (http://www.wowwiki.com/Widget_API), specifically the ScrollingMessageFrame section (http://www.wowwiki.com/Widget_API#ScrollingMessageFrame). From there you can look up the details of the :AddMessage() function which are listed here (http://www.wowwiki.com/API_ScrollingMessageFrame_AddMessage). Hope that helps.
    •  
      CommentAuthormeow
    • CommentTimeOct 15th 2007
     
    thanks... looks like it was hidden on http://www.wowwiki.com/Widget_API under ScrollingMessageFrame ... which didn't click to me as related to chat frame.


    http://www.wowwiki.com/API_ScrollingMessageFrame_AddMessage is the information I was after and http://www.wowwiki.com/UI_Escape_Sequences explains how others had been using it also.

    API ScrollingMessageFrame AddMessage

    Outputs text to a local MessageFrame, with optional color id.

    MessageFrame:AddMessage(text[,r,g,b[,id]]);

    Parameters
    Arguments

    (String text, Number red, Number green, Number blue, Number id)

    text
    The string message to output
    r
    The intensity of the red component. A number between 0.0 and 1.0
    g
    The intensity of the green component. A number between 0.0 and 1.0
    b
    The intensity of the blue component. A number between 0.0 and 1.0
    id
    A number that classifies the line of text, for later changing the color

    Returns

    nil


    Supported Escape Sequences

    |cAARRGGBB
    Sets text color. Text following this escape sequence will be drawn in this color. Each pair of digits represents a color value (plus the alpha value) as a hexadecimal number.

    * |cFFFF0000 - Red text
    * |cFF00FF00 - Green text
    * |cFF0000FF - Blue text
    * |cFFFFFF00 - Yellow text
    * etc.

    |r
    Reset the color, all text following this sequence will be drawn in the default color of the text.
    |Hlinkid|hLinktext|h
    for Hyperlinks, while the only currently known links are item, enchant and player links
    |Hitem:ItemID|hLinktext|h
    for Item Links (ItemID must be the full Item-Id, ie. d:d:d:d:d:d:d:d style)
    |Henchant:EnchantID|hLinktext|h
    for Enchant Links
    |Hplayer:Name|hLinktext|h
    for Player Links (Click to whisper, CTRL-Click to select and Shift-Click to do a /Who Name)
    |n
    Possibly as newline in some cases.
    ||
    Output "|" regardless of if whatever follows it looks like a valid escape.


    A "|" followed by something that is not a valid escape sequence will be displayed as-is.


    ok with more time I should be able to think of something. thanks again
    •  
      CommentAuthorHirsute
    • CommentTimeMar 31st 2008
     
    Okay, to resurrect an old thread (sorry): the syntax listed is "MessageFrame:AddMessage(...)"

    Stupid question, but if I created a message frame called "Auctioneer", would this turn into "Auctioneer:AddMessage(...)"?

    Sorry for the stupid question, I'm trying to be a little more helpful around here and see if I can't help get the print-in functionality back again.
    • CommentAuthorRockSlice
    • CommentTimeMar 31st 2008
     
    Posted By: RandallStupid question, but if I created a message frame called "Auctioneer", would this turn into "Auctioneer:AddMessage(...)"?


    That's correct. Object:Action() in general means to do Action() on Object.
    •  
      CommentAuthorHirsute
    • CommentTimeMar 31st 2008
     
    Rock: Awesome, thanks! Now I just need to look into how I can make that Object name be a variable, then put a control in the gui config to allow user definition of the variable, something like

    perferredunitframe=<output from the control>

    preferredunitfram:AddMessage(..)

    Then I'll be on my way to making at least a small contribution to the code.
    •  
      CommentAuthorHirsute
    • CommentTimeApr 2nd 2008
     
    This functionality has been added to the current dev version. If all is well, should be available in the next release.
World of Warcraft™ and Blizzard Entertainment™ are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.