This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Is there a way fora macro to run a subsequent macro?
Post Reply
Return to board index
Post by
706034
This post was from a user who has deleted their account.
Post by
706034
This post was from a user who has deleted their account.
Post by
Neffi
Place macro 1 on a button. Type /framestack and you should be able to find the name of that button by hovering the mouse cursor over it. In the 2nd macro, add:
/click buttonname
By the way I'm drafting up ideas for a better macro system. This is going to include self-contained blocks (eg, apply a single set of conditionals to an entire block of commands), arbitrary sequencing (like /castsequence for any aribitrary commands), unlimited-length macros (by chaining them for you automatically) and some other really neat stuff. I think this addon is going to be useful enough that I'll create a thread here once I've finished making it.
Don't hold your breath though. This one ain't gonna be done too soon. College has got me pretty bombarded with work, so I expect I won't have time to write it for another month or so.
Post by
pelf
Syntax highlighting.
You say "by chaining them for you automatically". You're still going to store the macro(s) in the macro slots? Doesn't that run into a number-of-slots issue?
Post by
Neffi
Good idea.
It's not plausible to hook the existing macro UI that way. Taint would become a nightmare and make a lot of things impossible. It's going to be a custom UI, with direct binding options. For calling the custom macros from normal action bars (or other addons), I'll provide a frontend to hook into the default macro UI. It'll give you an option to "export" one of my macros to the default macro frame, which will then create a placeholder macro that "clicks" my macro.
Post by
pelf
Ok. That kind of chaining. I didn't really get what it meant the other way around.
Can you use the same lib that _DevPad and Hack use? ... Huh, I swear I remember there being one. Looks like the _DevPad guy wrote his own highlighter of sorts.
Oh no, nevermind. I was thinking of
ForAllIndentsAndPurposes
. He's hooking into the token lists there to add a few more.
--- Syntax highlights and indents a string of Lua code.
-- @param CursorOld Optional cursor position to keep track of.
-- @see lib.Enable
-- @return Formatted text, and an updated cursor position if requested.
function lib:FormatCode ( TabWidth, ColorTable, CursorOld )
EDIT
: Well, perhaps some stuff to look at in there. He's hardcoding the syntax elements for Lua, so it wouldn't just plug in. I guess there was no reason to make it a generic tokenizer/highlighter.
Post by
Neffi
I really don't like FAIAP. It's really poorly done in some respects. I've been thinking of ideas for a good syntax highligher, with stuff like proper tabbing in WoW's edit boxes and such. (Since I'm also making a general development aid that includes a text editor.) When it comes to tokening Lua I'd probably pull the basic logic out of reference luac.exe's source to make sure it's correct. As for macro syntax, well that's exceedingly easy to parse.
Post by
pelf
Don't forget an unreachable-code color for when
/stopmacro
is used with no parameters
:)
.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.