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
GregS  
#1 Posted : Wednesday, October 20, 2021 9:51:53 PM(UTC)
GregS

Rank: Newbie

Groups: Registered
Joined: 10/20/2021(UTC)
Posts: 5
Canada
Location: Ontario

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
I want to pull part of the title from the active input to determine which of two cameras is active.
I wrote the following test script:
Quote:

'What Camera is Active
Dim x as new system.xml.xmldocument
x.loadxml(API.XML())
Dim ActiveInput As String = (x.SelectSingleNode("//active").InnerText)
Dim ActiveQuery As String = "//input[@number=" + ActiveInput + "]/@title"
Dim ActiveTitle As String = (x.SelectSingleNode(ActiveQuery).Value)
Console.WriteLine(ActiveTitle)


If ActiveTitle Like "[AB] .+" Then
Dim WhichCamera As String = Left(ActiveTitle, 1)
Dim SceneName As String = Right(ActiveTitle, Len(ActiveTitle)-2)
Console.WriteLine("Current Camera is {0}, With Scene {1}", WhichCamera, SceneName)
Else
Console.WriteLine("Active Output is not a camera")
End If


When I save the script I get the error message:
Quote:

Error Line 10: BC30451: Name 'Left' is not declared

I confirmed that I got similar errors with Right and Len commands.
These are standard VB commands, but they don't seem to be supported.
Does anyone know of workarounds?

Thanks
Greg
doggy  
#2 Posted : Wednesday, October 20, 2021 10:55:12 PM(UTC)
doggy

Rank: Advanced Member

Groups: Registered
Joined: 12/27/2012(UTC)
Posts: 5,218
Belgium
Location: Belgium

Thanks: 291 times
Was thanked: 955 time(s) in 790 post(s)
Use substring

BTW it's vb.net and The left function is not available anymore (according to some google research)
Users browsing this topic
Guest
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.