Page 1 of 1

Batch

Posted: Fri Aug 24, 2012 2:58 am
by guzanit
Hi, is there a way I can make a batch file to run as a script into micromacro in the way

Code: Select all

rom/bot.lua profile:p1 character:c1 path:pa1
...
rom/bot.lua profile:p2 character:c2 path:pa2
...
Thanks a lot.
Sorry for my english

Re: Batch

Posted: Fri Aug 24, 2012 4:46 am
by lisa
well you could do the first easy enough but MM would need to know when the first is finished what it is doing before starting the second.

batch file to start looks like this

Code: Select all

@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/bot.lua" profile:p1 path:pa1 character:c1
I got that from Rock's commandline batch file, otherwise I'd have no idea lol

Re: Batch

Posted: Fri Aug 24, 2012 5:15 am
by guzanit
Thanks lisa, i know that code but its only for one execution as you said. And i dont want to launch a new micromaco window in each iteration.
All the step of the batch file shoud execute inside the same micromacro window.

Re: Batch

Posted: Fri Aug 24, 2012 6:00 am
by lisa
I would probably look at creating a new "control" .lua file to handle what you want to do, there are no commands at the moment to handle it.

GW2 launches tomorrow so I probably won't have to the time for it.

The way I would probably look at it would be to create your own launcher to start the bot.lua but also add in a new error() function so that when MM errors it will do the code in thise new launcher and continue on. Then in your WP files end it with an error().

I am sure this was posted somewhere before about using the error function like this, might be an idea to do a forum search for it =)

Re: Batch

Posted: Fri Aug 24, 2012 7:04 am
by guzanit
Thanks lisa again, i will look into forums for the error() function but as you said
lisa wrote: GW2 launches tomorrow so I probably won't have to the time for it.
...well left 19 hours.. :-)
i will have to delay this project a time.

See u in WvWvW in GW2

Sorry for my english

Re: Batch

Posted: Fri Aug 24, 2012 10:16 am
by Administrator
You could just make your own loop to continually load bot.lua.

Code: Select all

while(true) do
    include("bot.lua", true);
end