Multiple batches run one after another


I want to run multiple batches one after the other. (The second batch needs to wait for the completion of first batch and start)

if( ParamTrigger("batch", "run me" ) )
ShellExecute("runbatch", "C:/Program Files/AmiBroker/Formulas/Custom/Batch/", "" );
ShellExecute("runbatch", "C:/Program Files/AmiBroker/Formulas/Custom/Batch/", "" );

I tried above code. I see ShellExecute executes these aynchronously and second batch also getting started. But, I want second batch to be automatically started after 1st batch completes. How to achieve this?

Second query: While setting up actions in batch, I see maximum 34 rows and I dont see scroll down to extend batch further. This forced me to use second batch (That is too batches instead of 1 single batch). Is there a way to extend creating actions in first batch beyond 34 rows or so.

If you need strictly sequential execution, just make it ONE batch instead of two, by joining all commands in one batch.

Scroll: there should be scroll bar but also you can use ARROW (cursor) key.

1 Like


PFA my screen. ARROW(cursor) key is not taking the screen down. It just ends in last row..In my case, it's 'Play sound'. Also, please note, I cannot find scrollbar.

OK. I see the trick here. In the last row, i had to click 'Insert' and that inserts new row in current place (which I can move up/down as required.) Thanks for your suggestion. This can be closed.