I would like to know if it's possible to use @ifset for custom set variables (by using SET) because i have already spent way too much time trying to figure out why it's not working, i have already read the manual and searched google and the forum many times, but i never see a single example anywhere with the use of @ifset with variables, all examples are always shown with set commands.
Does this mean @ifset does NOT work with variables even if they were declared with SET ? Then what else is there to use conditioning with variables ? There's got to exist a way to execute some commands ONLY if a variable meets a certain condition, because ifset seems to only work with commands.
Here's the example of what i have been trying (even tough it's just a example for testing, since this isn't what i really want to achieve, it's a lot more complicated than this) :
(In hindsight, the @set command modifier should have been named something else to avoid this confusion. Or maybe the Set command should've been named something else, since it can also be confused with the DOS Set command. Lots of people's configs depend on the names now, though, so it'd be painful to change them.)
@ifset is also evaluated when the command is parsed, not when that line in the command is reached. It doesn't give full conditional branching / looping to Opus commands; it's much more limited than that.
If you need to do proper conditional branching, looping and variables, it's usually best to call into some VBScript, Javascript, or similar. i.e. Using Opus to run the script and pass the filenames, source directory or other required details to the script, with the script then taking over. (If the script needs to run some Opus commands, it can do so via "dopusrt.exe /cmd", although such externally-launched commands cannot use things like {dlgstring}. If you need to prompt the user, it either has to be done before the script is run, passing the user input to the script as arguments, or the script would have to display its own prompts.)
Oh thanks now i understand why, in fact i was already fearing this since if there was another way i would have found it already on the manual. Yeah using vbscripts is the best for me since i know how to code in vb.net.