I was wondering if it was possible to create a new "spell" ie, a button (inherited from SecureActionButtonTemplate) that can be placed on the action bars.
I can create the button and the like, but right now I'm having the user have to use a macro
to access it. I'd prefer not to force them to have yet another frame/interface sitting on the screen somewhere.
Thought that an actual button might make sense. But I'm not sure if it is even possible, I've never seen this kind of behavior before.
Mostly I'm looking at ways to better access a SecureActionButton I need to create, any ideas here are welcome.
1) Are you talking about a dragable button that you can drop onto another action button?
2) Are you talking about a button that you can drop a spell from the spellbook on?
3) Are you talking about a button that, when clicked, casts a spell?
1) Don't reinvent the wheel, this mechanic is built into the spellbook.
2) Use :RegisterForDrag([button]), the handler, OnReceiveDrag, GetCursorInfo(), ClearCursor(), and :SetScript([handler], [function]) and use :SetAttribute() inside [function] as in #3.
3) Use :SetAttribute("type", "spell") followed by :SetAttribute("spell", "Spell Name")
So there is no method in the wow-API that does the '/click'-command?
There is "button:Click()" but that requires a hardware event just like "/click button"...
From the sound of things, a macro is your best bet. Take a look at Buffet or Squire for examples of addons that create and update macros. You can use a simple "/click button" macro, update a "#showtooltip" line in the macro as appropriate to provide intuitive feedback for users, and even provide a means for users to pickup the macro for placement on an action bar without having to look through the macro UI for it.
Well, autobar gives me the possibility to create a button which contains a macro. I'm not good enough in coding to do the reverse-engineering and find the places in its code where this is done, but actually that's pretty much what I'm looking for, creating buttons which execute macros. Anybody can give me a hint how this is done?