ShellExecute within exploration

Hi TJ & Afl master ,

i written a script to run windows command in afl , the problem is ,the shellexecute (Z variable) keeping running while the exploration run. its took the process of exploration become a very slow. How to make the shellexecute should be run after the addcolumn has done the exploration first or any other idea?

Z=ShellExecute("cmd.exe","/c rename C:\Data\AAA.TXT ABC.TXT","",0);

thanks in advance ...

You can't. AmiBroker is multithreaded program and many things are happening in parallel. ShellExecute is asynchronous.

You should be using BATCH instead - this one allows "waiting" for Analysis to complete.