1. How to hook and paste any link into the editbox?

    I'm making addon for multiple chat messages. So i need to be able to paste links into the editboxes. How it is better to realize?

    You really need to be more specific about what you would like to accomplish. There is no magic way to say "shove all links into this edit box". What you can do is decide what type of links you would like to get.. and then hook all of the sources for that.

    It's a non-trivial exercise and requires quite a bit of work. It would really help if instead of telling us how you want to implement something, tell us what you're trying to do. What is the addon, why are you concerned with links?

    Ok. While playing WOW there is some situations where I need to send big texts (more 255 symbals). For example linking many recipes. So i've written table-like addon with multiple editboxes. It's almost done, but processing links and some trifles.

    P.S. sorry for my english)

    Ok. While playing WOW there is some situations where I need to send big texts (more 255 symbals). For example linking many recipes. So i've writed table-like addon with multiple editboxes. It's almost done, but processing links and some trifles. P.S. sorry for my english)

    Your English is fine, I'm just not understand what you want to accomplish. I'd like to help, but I'm not really sure where to even begin. Can you give me one example of what you need to happen?

    En example? Look: there's two EB [ ] [ ]. The first one i'm filling with some advertising text, and in the second one I want to paste links of my professoins or recipes. Or it can be items for selling. So while the second EB is active, i need to get link and place it into this EB. And then send this two EBs to trade chat.

    Then you need to look into the handler on the trade skill window that is clicked to create the link in the first place. You secure hook that function, and when your edit box has focus, insert the link into your edit box.

    Thaks. Hooking is a good method but i did it by replacing ChatEdit_InsertLink function.

    Can I ask another questions about development or it'll better to create a new topic?

    Thaks. Hooking is a good method but i did it by replacing ChatEdit_InsertLink function.

    Can I ask another questions about development or it'll better to create a new topic?

    If you replaced the ChatEdit_InsertLink function, then you ARE hooking. In particular you should make sure that you respect the hooking rules and call the original function when your code is not running.

    Also, playing with and hooking the chat frame is a bad idea. You can taint the chat frame and lose the ability to right-click on player names. You may not see the issue immediately but you definitely MUST consider it.

    As for another question, its' best to start a new topic if its unrelated. That way other people may see the topic and be able to help.

    I think it'll be ok. If someboby interested there's part of code

     ChatEdit_InsertLink_old=ChatEdit_InsertLink;
     function GetLink(lnk)
        if(Focused_EB=="nil") then 
            ChatEdit_InsertLink_old(lnk);
        else
            getglobal(Focused_EB):Insert(lnk);
        end
     end
     ChatEdit_InsertLink=GetLink;
    

    FocusedEB name of focused exitbox. If no one of my EB is focused FocusedEB == "nil"