Conditional Logic

[quote="Julianon"]That's good, and it's a genuine conditional test. But it involves having the DOS box up all the time when NitroPDF is running (unless you specifically click on it and close it), which is also inelegant.

I don't think that there is any way to close the DOS box automatically once NitroPDF starts, is there?

It would be good to be able to do it inside DO.[/quote]

Add @runmode hide to the top of the command and the DOS box won't appear at all.

Be careful not to use any internal Opus commands in the middle of the conditional logic as they will cause the batch file to be split up and break everything. (If you want to be extra safe, you could save a .bat file and have Opus run that instead of having the batch logic within the button itself. If you're going to use an external file you can use nicer languages like VBScript or JScript instead of batch files, too. :slight_smile: )

If you want to store external scripts, go to /dopusdata, create a Scripts folder and put them in there. Opus will include everything within that folder when it does a backup and restore. (It has to be called Scripts to be backed up.)

Another way you can get conditional logic is by "abusing" rename scripts, which is a trick to embed VBScript, JScript etc. into a button. (It really just gives you a way to avoid having the external file, so it may not be worth using here. Up to you!)