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
NicholasBates  
#1 Posted : Thursday, April 7, 2022 5:13:58 PM(UTC)
NicholasBates

Rank: Newbie

Groups: Registered
Joined: 4/7/2022(UTC)
Posts: 5
Australia
Location: Woodwark

I cant see where to go from here?

Hey man,

Cant get the code to work, can i get your assistance?


Starting Script "Timestamp"
Script 'Timestamp' Error Line 8: Object reference not set to an instance of an object.
Stopping Script "Timestamp"




Originally Posted by: elgarf Go to Quoted Post
You can use script if you have 4K or Pro version.

Code:
'Text file for time marks
dim FILENAME = "D:\out.txt"

'Get recording duration
dim xml = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
dim Duration = integer.parse((x.SelectSingleNode("//recording/@duration").Value))

dim Second = math.floor(Duration mod 60)
dim Minute = math.floor((Duration / 60) mod 60)
dim Hour = math.floor((Duration / (60 * 60)) mod 60)

'Write recording duration to file
System.IO.File.AppendAllText(filename, string.format("{0:00}:{1:00}:{2:00}"&Environment.NewLine, Hour, Minute, Second))
doggy  
#2 Posted : Thursday, April 7, 2022 7:31:38 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 290 times
Was thanked: 952 time(s) in 787 post(s)
if you are going to keep posting the same question in different posts ( as you claim in the hope of getting an answer faster) without reading the answer given in one of them you run the risk of being banned from this forum for spamming
NicholasBates  
#3 Posted : Thursday, April 7, 2022 7:46:47 PM(UTC)
NicholasBates

Rank: Newbie

Groups: Registered
Joined: 4/7/2022(UTC)
Posts: 5
Australia
Location: Woodwark

Its more about the title

Originally Posted by: doggy Go to Quoted Post
if you are going to keep posting the same question in different posts ( as you claim in the hope of getting an answer faster) without reading the answer given in one of them you run the risk of being banned from this forum for spamming


gpdipalmerahtimur  
#4 Posted : Thursday, April 7, 2022 8:26:19 PM(UTC)
gpdipalmerahtimur

Rank: Advanced Member

Groups: Registered
Joined: 6/5/2020(UTC)
Posts: 91
Indonesia
Location: Jakarta

Thanks: 17 times
Was thanked: 5 time(s) in 3 post(s)
Hi Nicholas,

You need to test the XML returned by vMix. As far as I remember we have "vmix" as root node, you can't find the other node if you don't use the root node. I suggest you to test it with Console.WriteLine and do some research from the Google. If it is related to VB.NET basic, I think we shouldn't ask here. Probably you can ask in this thread instead:

Scripting for Dummies

Doggy is expert in this :)
doggy  
#5 Posted : Thursday, April 7, 2022 9:12:40 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 290 times
Was thanked: 952 time(s) in 787 post(s)
Originally Posted by: gpdipalmerahtimur Go to Quoted Post
Hi Nicholas,

You need to test the XML returned by vMix. As far as I remember we have "vmix" as root node, you can't find the other node if you don't use the root node. I suggest you to test it with Console.WriteLine and do some research from the Google. If it is related to VB.NET basic, I think we shouldn't ask here. Probably you can ask in this thread instead:

Scripting for Dummies

Doggy is expert in this :)


OP should not be an ** by make several new duplicate posts about this and read the answer given where he originally asked the question
Can't find a node if it is not there ;-)

https://forums.vmix.com/posts/m101117-Timecode-Marker-Hotkey#post101117

that's 3 different posts : this one , the link above and this https://forums.vmix.com/posts/t28839-Cant-get-Code-to-work
Users browsing this topic
Guest (3)
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.