• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Macro running another macro (1 Viewer)

Warrene

Member
Joined
Mar 21, 2005
RedCents
20¢
********** WRONG THREAD, CAN"T FIGURE OUT HOW TO MOVE IT TO QUESTIONS ***********


I'm looking for a sanity check. I experimented a bit go, the results weren't what I expected, so I'm looking for some insight or corroboration.

Goal:
While a macro is running, have it conditionally fire up another macro. Something like:

/if <some condition> {
/<do some miscellaneous stuff>
/mac theothermacro
}

I hoped that this would essentially close down macro #1 and fire up macro #2, as if I had programatically or manually executed /endmac, then manually executed /mac theothermac.

Didn't seem to work this way. It looked as if some variable initialization didn't occur.

The two macros work fine independently. I admit I did nothing special beyond what I described above. I also admit that proper programming technique would be to re-code these macros into a set of .INCs or subs withing a single macro, but I was looking for a shortcut.

So, any suggestions? "It doesn't work that way" is a satisfactory response and if that's the answer, I'll be patient while I work out the code, but I was hoping I missed something obvious that should be added to macro #2 to let it start up gracefully.

...I also added similar logic to macro #2 so that it could conditionally end and return control to macro #1. Never got that far.
 
this is the way I used to do it. Change macro2.mac to macro2.inc then change the sub main in macro2.inc to sub macro2 or whatever you want to call it ie. sub combine.
make sure all the defines are different than the ones in macro1. before sub main in macro1.mac put in #include macro2.inc
Now instead of doing /mac macro2 use /call macro2 (or what you changed sub main to ie sub combine)
at the end of sub macro2 most would have a /goto remove that line and it will just /return back to your main macro.
 
siddin said:
this is the way I used to do it. Change macro2.mac to macro2.inc then change the sub main in macro2.inc to sub macro2 or whatever you want to call it ie. sub combine.
make sure all the defines are different than the ones in macro1. before sub main in macro1.mac put in #include macro2.inc
Now instead of doing /mac macro2 use /call macro2 (or what you changed sub main to ie sub combine)
at the end of sub macro2 most would have a /goto remove that line and it will just /return back to your main macro.

Sounds like a plan. I hadn't given that angle any real thought, and your description sounds like a minimalist approach to integration. Translation: I really need to have a common macro, and your suggestion offers the least amount of coding.

Thanks!
 
Warrene I had the same problem a while back, the variables would not work properly when the 2nd macro was started from the first macro.

I ended up just splicing the macros together, but siddin's suggestion is better. :)
 
Acigaretteandsex said:
I just added the second mac to the first and set up another #event .

That is really easy too. the problem i had was that the 2 macros conficted with eachother. And would get real buggy so i had to make sure other mac was done to make mac 2 run. I guess it depends on what ya trying to do.

Hopefully you got some ideas warrene.
 
Macro running another macro

Users who are viewing this thread

Back
Top