Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-10-06, 11:53 AM   #1
Kiphere
A Deviate Faerie Dragon
Join Date: Dec 2006
Posts: 17
How do I add args to /commands.

Been teaching myself how to make addons with some help from folks on the official WoW Ui forums. I've run into a roadblock though so I figured I'd come here.

I found a resource for creating a slash command and I've got it working but it's also pretty much global. I've basically got 120 buttons on my screen now, created an overlay frame for each one that is movable and drags the button along with it.

The slash commands currently look like this:

Code:
SlashCmdList["ColonelBarCOMMAND"] = 
function(msg) 
    if strlower(strtrim(msg)) == "move" then
        for i = 1, 120 do
              getglobal("EasyBarButton"..i.."Cap"):Show()
        end
    elseif strlower(strtrim(msg)) == "lock" then
        for i = 1, 120 do
              getglobal("EasyBarButton"..i.."Cap"):Hide()
        end
    end
end
SLASH_ColonelBarCOMMAND1 = "/eb"
SLASH_ColonelBarCOMMAND2 = "/easybar"
Now, that just turns on the 'cap' basically and turns it off but it does it for all 120 buttons. I can't find anything that tells me how to create an arguement in a slash command so I figured I'd come here and ask

I basically want to make it so I can move or lock individual buttons, right nwo I don't mind having to do them all individually, I'll work on grouping later.

Thanks in advance for any help you folks can offer.
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » How do I add args to /commands.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off