@nodeselect
"C:\Program Files\WinRAR\WinRAR.exe" e {filepath$} {filepath$|noext}\
"C:\Program Files\7-Zip\7z.exe" a {filepath$|ext=cb7} {filepath$|noext} -m0=lzma2 -mx=9
Delete {filepath$|noext} FORCE QUIET NORECYCLE
Above function coverts .cbz, .cbr to .cb7 (e-comic files, actually ZIP, RAR, 7Z respectivately). I use it in context menu.
function_default_async is set to False (default).
If I run this function for multiple files, it behaves strange (at least in my opinion). It first executes first line (WinRAR) for each file - at this point I have a multiple temporary directories/files, then second line (7z) for each selected file, then finally third (delete) line.
Of course this is a bit unoptimal, because it requires a big amount of disk space for temporary files/directories that ultimately will be deleted.
Wanted behaviour is completing all three steps for one selected file before processing next selected file.
Any ideas (or what I'm doing wrong)?
Directory Opus 10.0.2.1.4344 x64
Vista Ultimate x64
The most straightforward way to do that is to move the main commands into a .bat file (making it use the DOS Del command instead of the Opus Delete command), then make the Opus button call the .bat file, passing the different filepath versions as arguments.
You might need to put @sync: before the batch file name to stop Opus running the batch file in parallel for all the files at once.
Also, keep the @nodeselect in the Opus command, and no in the batch file, of course.
If you want to try that but aren't familiar with passing arguments to batch files, let us know and we can explain in more detail.
I've just spent a good hour trying to figure out how to do something similar to this and failed. Is there any chance that a future Dopus version could include a modifier that would allow each command to occur sequentially before the function moves on to the next file; it would be nice to keep simple functions like this within Opus rather than having to venture out to bat files or VB Scripts etc?
This is DO philosophy - it executes each script line in turn. If single line is to be run mutiple times, it is run mutiple times and then execution goes to the next line.
The built-in scripting support added to Opus 11 (after this thread was started) makes it quite easy to do things the other way when needed, while still keeping everything in a single button (no bat fies, script files or user commands needed anymore).