Droid Engineer Archive

Thread: Please elaborate, new question (macro)

Jaxsys123
Mon Jun 07, 2004 7:37 pm
#1



That last reply I wrote to myself (duh) should have been a question again, I am sorry, here it is:



"That I understand, but how do I perpetuate the macro so that my last input goes back to the beginning? There must be a way to do this with just one string (1 loop of commands).. not an infinate loop.... help!!!!"


This was in response to the last answer I got. Example of my problem:


I have the following macro put in:


/sit; /pause 30; /stand; /pause 1; /sample; /pause 3; /stand; /pause 1; /sit; /pause 30; ....... etc.


After my last command, my charatcer stops working. How can I loop this without typing in 1,000,000 commands?


Thank you

Malitevv
Mon Jun 07, 2004 8:58 pm
#2

very easy. you can call a macro from insideanother macro. But the restriction is that a macro cannot call itself directly. So do this. Suppose the macro above is called "harvestMacro". Create another macro called "harvestRepeat" or something and put this in the harvestRepeat macro:


/pause 5; /m harvestMacro;


I put the paus in there only as a buffer to make sure that the harvestRepeat macro doesn't attempt to call the harvestMacro again "too quickly". Not sure if the extra paus is needed. In any case, once you've created the harvestRepeat macro, add this to the end of your harvestMacro:


....; /m harvestRepeat.



It will then repeat for ever. When your harvestMacro finishes, it will call harvestRepeat. harvestRepeat will wait a few seconds and then call your harvestMacro again. And it will go on forever.


And remember, to terminate your infinitely repeating loop type: /dump







---------------------------------------------------------------------
In a minute there is time
For decisions and revisions which a minute will reverse.

T.S. Eliot
Page 1 of 1
Previous Next