View Single Post
11-29-10, 07:36 AM   #9
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
He only wanted a function to put in the text in the chat box and do nothing more, so here you go mate:

Code:
local function putInChatBox(name)
  name = type(name) ~= "string" and "" or name
  local e = DEFAULT_CHAT_FRAME.editBox
  ChatEdit_ActivateChat(e)
  e:SetText("/tdps whisper "..name)
end

-- example: putInChatBox("Vladinator")
The first line makes sure the param is a string, if not it uses a empty string so the function still works.

Last edited by Vlad : 11-29-10 at 07:38 AM.
  Reply With Quote