Rank: Member
Groups: Registered
Joined: 5/8/2021(UTC) Posts: 11 Location: Burnaby Thanks: 1 times Was thanked: 11 time(s) in 3 post(s)
|
Is there a way to return multiple variables from one XPATH request via the TCP API? I would like to return all attributes from a specific input.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
|
|
|
|
Rank: Member
Groups: Registered
Joined: 5/8/2021(UTC) Posts: 11 Location: Burnaby Thanks: 1 times Was thanked: 11 time(s) in 3 post(s)
|
Right. So, would the request be /vmix/inputs/input1/attributes::* ? I have tried a few commands that seemed as though they should return multiple values but I can only get 1 value returned per request. My issues could also be a node socket issue. This is my first experience with XPATH, thanks for the help.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,216 Location: Belgium Thanks: 291 times Was thanked: 955 time(s) in 790 post(s)
|
Originally Posted by: tk421 Right. So, would the request be /vmix/inputs/input1/attributes::* ? I have tried a few commands that seemed as though they should return multiple values but I can only get 1 value returned per request. My issues could also be a node socket issue. This is my first experience with XPATH, thanks for the help. Could you be more specific pls. What exactly do you want to retrieve , why with one request , .... more info is always helpful to get proper answers try /vmix/inputs/input[1]
|
|
|
|
Rank: Member
Groups: Registered
Joined: 5/8/2021(UTC) Posts: 11 Location: Burnaby Thanks: 1 times Was thanked: 11 time(s) in 3 post(s)
|
I would like to retrieve the full list of attributes for a specific input node, ex:
<input key="cf0d1391-5d9b-40c8-a3f7-32687e05e249" number="1" type="GT" title="Text Middle Centre.gtzip" shortTitle="Text Middle Centre.gtzip" state="Running" position="0" duration="0" loop="False" selectedIndex="0">
Which I would assume would look something like this
key="cf0d1391-5d9b-40c8-a3f7-32687e05e249" number="1" type="GT" title="Text Middle Centre.gtzip" shortTitle="Text Middle Centre.gtzip" state="Running" position="0" duration="0" loop="False" selectedIndex="0"
What I'm actually trying to return is the key, position, and duration of a specific input. Because of the async/listener design of the socket connection, the call does not actually return anything, rather a separate listener is triggered with response data from vmix. It would make things much easier if there was some form of id/key in that response. If request A is made and then B is made immediately after, there is the (slight) possibility of that response B returns before response A...correct? Is there another method of consuming TCP APIs without using sockets?
I have tried /vmix/inputs/input[1], which returns the inner text, title, of the node. Also, thank you for your help doggy
|
|
|
|
Rank: Member
Groups: Registered
Joined: 5/8/2021(UTC) Posts: 11 Location: Burnaby Thanks: 1 times Was thanked: 11 time(s) in 3 post(s)
|
My suspicion is the response function from vmix will not multiple return values.
XMLTEXT /vmix/inputs/input[1]/attribute::*
=> Returns the key only, which is the first listed attribute in the node
XMLTEXT /vmix/inputs/input[1]/@key | /vmix/inputs/input[1]/@duration
=> Also returns the key only
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close