Log in

View Full Version : [Help] Shorten macro by removing extra unnecessary /run commands?



oxalicacid224
08-05-2018, 10:39 PM
I'm having no luck figuring this out. What I need is an efficient macro that can execute multiple actions without writing /run before every similar command. Basically I need to know how to write a list.

Inefficient code:


/run SetBinding("F1","MULTIACTIONBAR1BUTTON1")
/run SetBinding("F2","MULTIACTIONBAR1BUTTON2")
/run SetBinding("F3","MULTIACTIONBAR1BUTTON3")
/run SetBinding("F4","MULTIACTIONBAR1BUTTON4")
/run SetBinding("F5","MULTIACTIONBAR1BUTTON5")


The code below is what I need. Except it doesn't work. :(


/run SetBinding(
"F1","MULTIACTIONBAR1BUTTON1",
"F2","MULTIACTIONBAR1BUTTON2",
"F3","MULTIACTIONBAR1BUTTON3",
"F4","MULTIACTIONBAR1BUTTON4",
"F5","MULTIACTIONBAR1BUTTON5"
)


What am I doing wrong here?

Also, if there is a smart cookie out there; How to write MULTIACTIONBAR1BUTTON(1-5) To make it even more compact?

JohnGabriel
08-06-2018, 12:50 AM
You can put them on one line no line returns.


/run SetBinding("F1","MULTIACTIONBAR1BUTTON1")SetBinding("F2","MULTIACTIONBAR1BUTTON2")SetBinding("F3","MULTIACTIONBAR1BUTTON3")SetBinding("F4","MULTIACTIONBAR1BUTTON4")SetBinding("F5","MULTIACTIONBAR1BUTTON5")

oxalicacid224
08-06-2018, 01:16 AM
Honestly dude. You're awesome. Thank you for the constant help today. I've installed macro toolkit because I'm having way too much fun with the knowledge you've shared. +Rep