Page 1 of 1

Help: Running scripts in order

Posted: 11 Sep 2014 16:45
by romero
I'm a scripting n00b and I wrote three scripts that I need to run in order, as they complement each other and work with the same paths. When I run them as separate scripts, they work perfectly. Like this:

::loadsearch "FOF html", rl;
sel a;
backupto [path], , 2;
loadsearch "log del", rl;
sel a;
delete 1,0;
loadsearch "new log", rl;
sel a;
backupto [path], , 2


However, if I try to run them as a single script, all kinds of crazy things happen. Like, files are moved instead of copied and from the wrong folders even. I figured I needed the script execution to pause to allow file operations to finish before continuing. I tried to use the "confirm" command, but that didn't seem to work.

What do I need to do to run this as a single script?

Re: Help: Running scripts in order

Posted: 11 Sep 2014 17:02
by PeterH
You should try

Code: Select all

  Setting "BackgroundFileOps", 0;   // DISABLE BACKGROUND Processing!
It only affects the current script.

Re: Help: Running scripts in order

Posted: 11 Sep 2014 17:06
by highend
Begin with:

Code: Select all

setting "BackgroundFileOps", 0;
Put it on the first line.

And maybe use step; / unstep; to oberserve where exactly anything bad happens

Re: Help: Running scripts in order

Posted: 11 Sep 2014 17:11
by romero
Thanks, guys! That seems to do the trick :biggrin: