Help: Running scripts in order

Discuss and share scripts and script files...
Post Reply
romero
Posts: 23
Joined: 10 Mar 2009 16:01

Help: Running scripts in order

Post 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?

PeterH
Posts: 2826
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: Help: Running scripts in order

Post by PeterH »

You should try

Code: Select all

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

highend
Posts: 14571
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Help: Running scripts in order

Post 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
One of my scripts helped you out? Please donate via Paypal

romero
Posts: 23
Joined: 10 Mar 2009 16:01

Re: Help: Running scripts in order

Post by romero »

Thanks, guys! That seems to do the trick :biggrin:

Post Reply