Ingreso rápido:  

Forum: General Discussion

Tema: How to execute multiple chain commands independendly?

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

Hi there

This is how VDJ scripting works (from the wiki page):
> Using "command1 ? command2 : command3" will query the state of command1, and if the result is true, execute command2, otherwise execute command3.

Its OK, but im trying this now:
"command1 ? command2 : command3 & command4 ? command5 : command6"

The problem now is: command 4 will just be executed if command 1 was false. It looks like:
"command1 ? command2 : (command3 & command4 ? command5 : command6 )"

How can i let run command4 independendly of the result of command1? Like this:
"(command1 ? command2 : command3) & (command4 ? command5 : command6)"

Or like batch scripting:
command1 ? command2 : command3 {/end if}
command4 ? command5 : command6 {/end if}
command7 ? command8 : command9 {/end if}






 

Mensajes Fri 03 Jul 20 @ 8:27 pm
NicotuxHome userMember since 2014
that's something not possible (and asked for years ): parenthesis please^^
"command1 ? command2 : command3 & command4 ? command5 : command6"
does interpret as
"command1 ? command2 : (command3 & command4 ? command5 : command6 )"
in a way to do
"(command1 ? command2 : command3) & (command4 ? command5 : command6)"
you have to duplicate the code
"command1 ? command2 & command4 ? command5 : command6 : command3 & command4 ? command5 : command6
 

Mensajes Fri 03 Jul 20 @ 11:11 pm
Thank you, Nico

This will be infinite, if i want 20 commands of them :c)
 

Mensajes Sat 04 Jul 20 @ 11:00 am
locodogPRO InfinityModeratorMember since 2013
does it really have to be instant?
if not you could use a repeat_start with a counter

set '$someCounter' 0 & repeat_start 'someRepeat' 25ms 20 & cycle '$someCounter' 20 & var '$someCounter' 1 ? Something : var '$someCounter' 2 ? Something Else :
 

Mensajes Sat 04 Jul 20 @ 11:28 am
Nice idea, locodog...
Batch scripting for runaways :c)
 

Mensajes Sat 04 Jul 20 @ 1:08 pm
locodogPRO InfinityModeratorMember since 2013
parentheses have been requested many times but there must be some technical reason why it can't happen.
method above is ok but for actual time critical things I'd like to see a zero time version of repeat_start that would work a bit like a for loop, but used wrong it could lead to stability issues.
I know of one hacky method which appears stable for a few thousand counter++ cycles but I've only ever used it experimentally.
 

Mensajes Sat 04 Jul 20 @ 2:54 pm


(Los tópicos y foros antiguos son automáticamente cerrados)