Calling /macro from a macro... Ill effects?

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

cantrememberusername
decaying skeleton
decaying skeleton
Posts: 4
Joined: Tue Sep 30, 2003 9:44 am

Calling /macro from a macro... Ill effects?

Post by cantrememberusername » Tue Sep 30, 2003 9:49 am

Are there any ill side effects to calling /macro from within a macro?

Doing this reports that the current macro ended and vars are cleared.


Scenario:

Have a macro called test.mac

Last line of test.mac is "/macro test.mac"

will this have any problems?


For those that ask why? Lets just say that test.mac has a tendancy to change frequently from a process outside of macroquest...

MQSEQ
Hypocrite fag
Posts: 181
Joined: Fri Sep 19, 2003 5:18 pm

Post by MQSEQ » Tue Sep 30, 2003 9:56 am

Create a master macro and then include all the other scripts into the master with the include statement.

This would allow you to call the routines from other scripts.

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Tue Sep 30, 2003 10:04 am

MQSEQ wrote:Create a master macro and then include all the other scripts into the master with the include statement.

This would allow you to call the routines from other scripts.
This wouldn't help him if his second macro is being changed or generated dynamicly from another source which is what I think he is hinting at.

I have never had a problem calling a macro from another. It does stop the 1st macro when the second one is ran, however..

Thanks
GrimJack
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

cantrememberusername
decaying skeleton
decaying skeleton
Posts: 4
Joined: Tue Sep 30, 2003 9:44 am

Post by cantrememberusername » Tue Sep 30, 2003 10:08 am

Yes, the test.mac is dynamically generated, and I need it to reload itself.

Just wondering if after a few hundred "reloads" by calling itself there might be memory corruption/leaks.

Anyone else successfully attempt something like this?

MQSEQ
Hypocrite fag
Posts: 181
Joined: Fri Sep 19, 2003 5:18 pm

Post by MQSEQ » Tue Sep 30, 2003 10:10 am

Depends on what actually changes. I guess we need to see what he is wanting to do.

MQ>EQ
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sun Sep 07, 2003 9:27 pm

Post by MQ>EQ » Mon Oct 06, 2003 9:55 pm

why dont u make a hotkey in eq like

/endmacro
/macro test.mac

and put somewer in your script /press 1

MQ>EQ