I tried to make a user command to customize the console window, so I wouldn't have to duplicate all the code between the various buttons, just give the arguments.
When I build my buttons, I launch this user command, then execute the ms-dos batch.
The problem I have here is that 2 batch files are generated and run separately, so the console window is the default one.
Is there a directive that allows building only 1 batch when possible?
I'm not sure if there's a way to make the main button and user-commands it runs all use the same command-prompt. Probably not as the user-commands are Opus commands so they'll be launched by Opus and not run within the main button's command-prompt.
Couldn't you put the stuff that's currently in the user command into a .bat file and call that?
Thanks for the tip, it works fine when my user command generates manually the .bat file within the user command!
It's just a little messier as I have to call the generated .bat file from the button... I can't do it via the user command, otherwise it wouldn't work.
I also tried to make a batch in the scripts folder which I call with parameters, but this doesn't seem to work this way.
In fact, this batch file only runs the 'Mode con:' & 'Title' dos commands, that's why it's kind of tricky to launch this.
I'll probably end up copying the code in every button I need.... it'll probably be easier, as the purpose of this user command was to make this console customisation easier in just one line