View Single Post
08-31-09, 10:11 AM   #4
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Actually.... add this nice little snippet to your lua and what i posted before becomes a valid function...

Also im trying to make calls to other addons slash commands not ones built into wow.

Code:
local function RunSlashCmd(cmd) 
	      local slash, rest = cmd:match("^(%S+)%s*(.-)$") 
	      for name in pairs(SlashCmdList) do 
	         local i = 1 
	         local slashCmd 
	         repeat 
	            slashCmd = _G["SLASH_"..name..i] 
	 
	            if slashCmd == slash then 
	               -- Call the handler  
	               SlashCmdList[name](rest) 
	               return true 
	            end 
	            i = i + 1 
	         until not slashCmd 
	      end 
	    end
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]

Last edited by Grimsin : 08-31-09 at 10:14 AM.
  Reply With Quote