@dulak
Macros give you an ability to create a "sub", short for subroutines. These pieces of code are lines that you might repeat often in many places, or for other uses. For example, "sub main", which you have in your macro, is what MQ2 activates when it wants to start the macro.
This is what I would add:
Code:
sub main
:loop
/gsay nothing new
/goto :loop
[color=red]/return[/color]
The reasons are two:
1) When you start making more complicated macros, it separates the end of one "sub" from the next, allowing you to easily see where one bit of code ends.
2) What "/return" does is exactly what it says it does -- it "returns" to the point in the code where that "sub" was activated. For example:
Code:
sub main
/echo Start
/call next
/echo Finish
/return
sub next
/echo Middle
/return
That will echo Start, Middle, Finish in that order. What happens is that MQ2 reads the line telling it to echo Start, and does that. Then it reads the "/call" command, which tells it to find "sub next". Once it does that, it does /echo Middle. Once it does that, it hits the "/return" command, which tells MQ2 to go back to "/call next", and keep going from there. So what happens is that it goes back to "/call next", and reads the next line, which is "/echo Finish". After it does that, it hits a "/return", which (in sub main) tells MQ2 that the program is done.
--Please, ask any questions you might have. I'll try to answer them as best I can...always love to help new guys get started, and I know that this can be a lot to absorb.