Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there any way to make a macro run automatically?

automatically macro run
0
Posted

Is there any way to make a macro run automatically?

0

Yes and no. If your macro is nothing more than a single /run command, you can easily get it to run on startup. The most bullet-proof ways are by using an addon that runs scripts for you (look under categories like “development” or “scripting” on the mod sites) or by writing your own simple mod that does nothing but execute your script (see the Mod Author Resources sticky for more information on writing mods). There is a third option which isn’t exactly recommended, but gets the job done. Simply copy and paste your /run command into the beginning of any addon’s .lua file and remove the “/run” from the beginning. This will not work 100% of the time since certain features are unavailable at the moment the code will run, but for the most common tasks it works just fine. Also, beware when you go to update your mods. If you get a new version of the one whose file you used, it will be overwritten. HOWEVER, scripts or slash commands that use protected functions cannot be used in this manner. T

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123