logo

Live Production Software Forums


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

Notification

Icon
Error

26 Pages«<1415161718>»
Options
Go to last post Go to first unread
Salvatore  
#301 Posted : Wednesday, November 16, 2022 2:35:25 AM(UTC)
Salvatore

Rank: Advanced Member

Groups: Registered
Joined: 11/15/2021(UTC)
Posts: 72
Italy

Thanks: 8 times
Was thanked: 9 time(s) in 7 post(s)
Hi,
i'm trying to search for a Input which contains a text part.
Example:
Input Name: "Startscreen_Main"

I'm looking only for the text "Startscreen"


something like:
dim Startscreen as string = (x.SelectSingleNode("//input[@title.contains='Startscreen']/@number").Value)
doggy  
#302 Posted : Wednesday, November 16, 2022 4:03:51 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Salvatore Go to Quoted Post
Hi,
i'm trying to search for a Input which contains a text part.
Example:
Input Name: "Startscreen_Main"

I'm looking only for the text "Startscreen"


something like:
dim Startscreen as string = (x.SelectSingleNode("//input[@title.contains='Startscreen']/@number").Value)


You probably would have found it quicker using Google search (xml xpath contains) instead of guessing ;-)
for example: https://stackoverflow.com/questions/103325/what-is-the-correct-xpath-for-choosing-attributes-that-contain-foo

Code:
dim Startscreen as string= (x.SelectSingleNode("//input[contains(@title,'Startscreen')]/@number").Value)
Salvatore  
#303 Posted : Wednesday, November 16, 2022 10:10:08 AM(UTC)
Salvatore

Rank: Advanced Member

Groups: Registered
Joined: 11/15/2021(UTC)
Posts: 72
Italy

Thanks: 8 times
Was thanked: 9 time(s) in 7 post(s)
Originally Posted by: doggy Go to Quoted Post


You probably would have found it quicker using Google search (xml xpath contains) instead of guessing ;-)


you're probably right, but this way everyone benefits ;-)

Thanks doggy
Joeboe  
#304 Posted : Thursday, November 17, 2022 8:45:52 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
I am trying to write a script to fade with a duration of 7 secs., but I keep getting 500Ms....(half Sec.)

Function=Fade&Value=0,7000

where I am I going wrong, or what am I missing?

Thanks in advance
Joeboe  
#305 Posted : Thursday, November 17, 2022 9:40:42 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
I ended up using a trigger, and it works.....I can now fade to black with a duration of 7 secs....and I can vary the time....was simple, and quick....
David BCS  
#306 Posted : Thursday, November 17, 2022 7:49:09 PM(UTC)
David BCS

Rank: Newbie

Groups: Registered
Joined: 11/17/2022(UTC)
Posts: 3

Thanks: 1 times
Hello!

Is it possible to replace "http://127.0.0.1:8088/api" to custom IP, which belongs to another computer in local network in this part?

dim xml = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
doggy  
#307 Posted : Thursday, November 17, 2022 8:31:22 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: David BCS Go to Quoted Post
Hello!

Is it possible to replace "http://127.0.0.1:8088/api" to custom IP, which belongs to another computer in local network in this part?

dim xml = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)


Sure you can load it from another computer (with the correct IP )

lots of examples

EDIT: the location of the vMix API XML is http://xxx.xxx.xxx.xxx:8088/API (one can check it in your browser)
doggy  
#308 Posted : Thursday, November 17, 2022 8:37:16 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Joeboe Go to Quoted Post
I ended up using a trigger, and it works.....I can now fade to black with a duration of 7 secs....and I can vary the time....was simple, and quick....


Confused: you asked first about a Fade duration (as in transition : Function=Fade) to your it's working to be a FTB (FadeToBlack) ?
David BCS  
#309 Posted : Thursday, November 17, 2022 8:58:20 PM(UTC)
David BCS

Rank: Newbie

Groups: Registered
Joined: 11/17/2022(UTC)
Posts: 3

Thanks: 1 times
Originally Posted by: doggy Go to Quoted Post
the location of the vMix API XML is http://xxx.xxx.xxx.xxx:8088/API (one can check it in your browser)


I meant how to parse API.XML of another computer

my solution (I'm not fluent in programming):

Code:
dim wc as WebClient = new WebClient()
wc.DownloadFile("http://192.168.88.11:8088/api", "C:\Users\admin\Desktop\getxml.xml")
dim doc as XmlDocument = new XmlDocument()
doc.Load("C:\Users\admin\Desktop\getxml.xml")
dim x as XmlElement = doc.DocumentElement


instead of

Code:
dim xml = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)





Joeboe  
#310 Posted : Thursday, November 17, 2022 9:09:59 PM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
Let me explain....I was trying to write a script to fade to black, with all audio sourses fading at the same time, then audio off at the end of the fade, and all players paused.....I have other scripts that do cross fades and other functions, and the reversals...... but I needed this for a production, as I do not want to use the FTB in vmix... I want to have many functions happening at the same time, and then I want to have a reversal of the same, to fade up from a black screen, with other functions fading up at the same time.....I ended up using triggers, but even though that works, and was not difficult to do, I would prefer a script, using the type of code I posted.....any help would be very helpful.....

Here is a script I use to do a cross fade...I have since added more lines of script for other functions.and also did a reversal of this script, and it works ok for what I am doing....I want to add a fade to black to this, where Black is a colour input (e.g. input 7)

Function=SetVolumeFade&Input=Audio Digital Audio Interface&Value=85,6000
Function=SetVolumeFade&Input=HYMNS&Value=0,6000
Function=SetVolumeFade&Input=PLAYER 1&Value=0,6000
Function=SetVolumeFade&Input=PLAYER 2&Value=0,6000
Function=SetVolumeFade&Input=PLAYER 3&Value=0,6000

I also use the FTB for streaming, where I would slowly fade to black, sleep for 10 secs., then stop stream, stop recording, all at the same time....like I said, the triggers work perfect, but I want to use a script, so I can transfer to other systems, as I can not find a way to export the triggers, and do not want to have to write everything all over each time I use a different PC.....
doggy  
#311 Posted : Friday, November 18, 2022 1:53:32 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Joeboe Go to Quoted Post
but I want to use a script, so I can transfer to other systems, as I can not find a way to export the triggers, and do not want to have to write everything all over each time I use a different PC.....



Copy/paste the script to a textfile and then to other computer
Also there is a Export and Import button in the scripting editor !!!!!!
Joeboe  
#312 Posted : Friday, November 18, 2022 2:23:51 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
Originally Posted by: doggy Go to Quoted Post
Originally Posted by: Joeboe Go to Quoted Post
but I want to use a script, so I can transfer to other systems, as I can not find a way to export the triggers, and do not want to have to write everything all over each time I use a different PC.....



Copy/paste the script to a textfile and then to other computer
Also there is a Export and Import button in the scripting editor !!!!!!



I do not know how to export the triggers...if that is possible

doggy  
#313 Posted : Friday, November 18, 2022 3:05:19 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Joeboe Go to Quoted Post


I do not know how to export the triggers...if that is possible



They are included in the presets (or bundle designed for transfering to other computer)

Extracting them from and Reinserting them in a preset out of vMix is possible but beyond the scope of this 'scripting for dummies' post
Joeboe  
#314 Posted : Friday, November 18, 2022 3:10:59 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
ok, thanks.....wish I knew how.....Guess I will have to try using the preset on another system, and see if the triggers get copied
doggy  
#315 Posted : Friday, November 18, 2022 3:38:00 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: Joeboe Go to Quoted Post
ok, thanks.....wish I knew how.....


No you don't as its kind of hacking preset files . Fun until things go wrong (and blame vMix)

Joeboe  
#316 Posted : Friday, November 18, 2022 6:33:44 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
Yes....even though I was able to do a workaround using triggers, I would still like to have a script to be able to do the FTB in 7 secs....which would be much easier, as I could have the script on a pendrive, and saved on my HD that I can transfer much faster..

What I did, was to have a colour input, in my case Black, and on transition in, I have it timed for 7 secs, with all my audio sourses set to fade for 7 secs....and a shortcut to select Black as a preview so that it will be in preview for the fade transition, and it works great.....but I still need a script, and I seem to be missing something in the code.....all other things are working, but the fade to Black just does not work.
nikosman88  
#317 Posted : Friday, November 18, 2022 8:02:40 AM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 543
Greece
Location: athens

Thanks: 130 times
Was thanked: 74 time(s) in 70 post(s)
Originally Posted by: Joeboe Go to Quoted Post
Yes....even though I was able to do a workaround using triggers, I would still like to have a script to be able to do the FTB in 7 secs....which would be much easier, as I could have the script on a pendrive, and saved on my HD that I can transfer much faster..

What I did, was to have a colour input, in my case Black, and on transition in, I have it timed for 7 secs, with all my audio sourses set to fade for 7 secs....and a shortcut to select Black as a preview so that it will be in preview for the fade transition, and it works great.....but I still need a script, and I seem to be missing something in the code.....all other things are working, but the fade to Black just does not work.


Hello. Try the command like this
Function=Fade&Input=nameyourblackinput&Duration=7000&Mix=0
Joeboe  
#318 Posted : Friday, November 18, 2022 8:43:16 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
Thanks Nickosman88, it works perfect....Now I can comlete my full script

Thanks a lot
Joeboe  
#319 Posted : Tuesday, November 22, 2022 7:35:33 AM(UTC)
Joeboe

Rank: Advanced Member

Groups: Registered
Joined: 4/16/2017(UTC)
Posts: 578
Location: jamaica

Thanks: 77 times
Was thanked: 32 time(s) in 31 post(s)
Hi all, Was trying to use an old scoreboard from vMix, but I find it will not function anymore....It seems that Dynamic Scripting is no longer working...I am on vMix 25...I had created this script in the regular titler, but now I have problems getting it to work, and even in GT Tltler, I can not get the scores to advance ... Need some help here, as I am preparing for a Tennis tournament in a few days..
mirrormatt86  
#320 Posted : Friday, December 16, 2022 6:21:40 PM(UTC)
mirrormatt86

Rank: Member

Groups: Registered
Joined: 12/13/2022(UTC)
Posts: 15
Australia

Originally Posted by: doggy Go to Quoted Post
'Is a input Running or on Pause retrieved from the API xml
dim xml = API.XML()
dim x as new system.xml.xmldocument
x.loadxml(xml)
dim StateOf = (x.SelectSingleNode("//input[@type='Replay']/@state").Value)
'or
dim StateOf = (x.SelectSingleNode("//input[@number='10']/@state").Value)
Console.WriteLine(StateOf)


so this results in an error. Great scripting "for dummies"
Users browsing this topic
Guest (11)
26 Pages«<1415161718>»
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.