logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
gokily  
#1 Posted : Friday, September 27, 2019 5:23:23 AM(UTC)
gokily

Rank: Member

Groups: Registered
Joined: 2/2/2019(UTC)
Posts: 13
Croatia

Was thanked: 2 time(s) in 1 post(s)
Is there a way to get status of an input/overlay etc via TCP API?

I'm writing just macros script and I can successfully send commands but I do not understand how to receive/get status of current Active input,Preview input etc.

Thank you
gokily  
#2 Posted : Friday, September 27, 2019 6:55:48 AM(UTC)
gokily

Rank: Member

Groups: Registered
Joined: 2/2/2019(UTC)
Posts: 13
Croatia

Was thanked: 2 time(s) in 1 post(s)
I've figured it out so here is a snippet if someone needs it:
Code:

function GetValue(string, num)
    if string == "active" then
       RawCommsNetSendString( Vmix, "XMLTEXT vmix/" .. "active" .. "\r\n")
    elseif string == "preview" then
       RawCommsNetSendString( Vmix, "XMLTEXT vmix/" .. "preview" .. "\r\n")
    elseif string == "overlay" then
       RawCommsNetSendString( Vmix, "XMLTEXT vmix/" .. "overlays/overlay[" .. num .. "]" .. "\r\n")
    --elseif stringe == "" then
    -- RawCommsNetSendString( Vmix, "XMLTEXT vmix/" .. "" .. "\r\n")
    end
    Sleep(10) -- wait 10ms before grabbing data
    receive = RawCommsNetGetIncomingPacketCount( Vmix );
    data = RawCommsNetGetInPacketAsString( Vmix, receive )
    --VSLog( data )
    data = data:sub(12) -- TRIM XLMTEXT OK
    VSLog(string .. " " .. data)
    return data
end
thanks 2 users thanked gokily for this useful post.
ryanlehms on 10/6/2019(UTC), worldeye on 11/25/2020(UTC)
Users browsing this topic
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.