I read in the wiki : Commands can be used either as actions or as queries, depending on the context.
How can I tell if a command is an action or a query? It gave examples, but didn't really specify a concrete rule.
Secondly, if I want to write a conditional operator that runs a different command based on if the deck is playing or not, how would I do that?
Thanks,
Doug
How can I tell if a command is an action or a query? It gave examples, but didn't really specify a concrete rule.
Secondly, if I want to write a conditional operator that runs a different command based on if the deck is playing or not, how would I do that?
Thanks,
Doug
geposted Sun 25 Aug 19 @ 8:56 am
Some commands can be used as queries not all
Some action only verbs exist
Some query only verbs exist
Badly no full list of existing verbs and usage or description exist yet
The context is simple : it's a query when used in a way to get its status/value
- left side of the nested conditional operator "?"
- as a parameter to another command
- in "query" field in skin
- in button names
It is an action when it will execute
play ? stop : play
1st play is a query, stop and second play are actions
set 'my_var' "`play`"
set is the action
play is a query
A good startpoint is Locodog's Script School : https://www.virtualdj.com/forums/223743/General_Discussion/Script_School.html?page=1
Some action only verbs exist
Some query only verbs exist
Badly no full list of existing verbs and usage or description exist yet
The context is simple : it's a query when used in a way to get its status/value
- left side of the nested conditional operator "?"
- as a parameter to another command
- in "query" field in skin
- in button names
It is an action when it will execute
play ? stop : play
1st play is a query, stop and second play are actions
set 'my_var' "`play`"
set is the action
play is a query
A good startpoint is Locodog's Script School : https://www.virtualdj.com/forums/223743/General_Discussion/Script_School.html?page=1
geposted Sun 25 Aug 19 @ 3:03 pm
Usually programming language definitions are very formal and precise and I'm sure a formal definition exists (it has to), although maybe no one has typed it out yet. It would be great if someone published a formal definition.
Thanks for that info though! It is helpful.
Thanks,
Doug
Thanks for that info though! It is helpful.
Thanks,
Doug
geposted Mon 26 Aug 19 @ 3:35 am
set 'my_var' "`play`"
wow.. three different types of quotes. yup, I'm definitely going to have to study more lol
wow.. three different types of quotes. yup, I'm definitely going to have to study more lol
geposted Mon 26 Aug 19 @ 4:27 am
LoL
My bad,
in practice the simple and double are the same
I simply use to quote variables and doublequote the other
with simple name and simple script they are optional
set my_var `play`
does exactly the same
My bad,
in practice the simple and double are the same
I simply use to quote variables and doublequote the other
with simple name and simple script they are optional
set my_var `play`
does exactly the same
geposted Tue 27 Aug 19 @ 12:29 am