Skip to content

Instantly share code, notes, and snippets.

View SysProfile's full-sized avatar
🏠
Working from home

SysProfile

🏠
Working from home
  • Ciudad de Buenos Aires
  • 13:43 (UTC -03:00)
View GitHub Profile
@SysProfile
SysProfile / Example vMix - jSON2XML.vb
Last active March 16, 2025 23:18
jSON2XML Pharser
' Ejemplo de uso:
API.Function("SetDynamicValue1", Value:="datos")
API.Function("SetDynamicValue2", Value:="{""persona"":{""nombre"":""Juan"",""edad"":30}}")
API.Function("ScriptStart", Value:="jSON2XML")
Luego, para leer el resultado:
Dim xml As String = API.XML()
Dim doc As New Xml.XmlDocument()
doc.LoadXml(xml)
Dim nodo As Xml.XmlNode = doc.SelectSingleNode("//dynamic/value[@key='DynamicValue2']")
Dim valor As String = If(nodo IsNot Nothing, nodo.InnerText, "No encontrado")
@SysProfile
SysProfile / vMix - MusicReload.vb
Last active March 11, 2025 01:06
Automatically reload vMix song list from a folder
Dim xmlDoc As New XmlDocument
xmlDoc.LoadXML(API.XML())
Dim inputName As String = "List"
Dim musicPath As String = String.Empty
musicPath = "D:\UniverFlix\@Common\Audios"
'musicPath = IO.Path.GetDirectoryName(xmlDoc.SelectSingleNode("/vmix/preset").InnerXml) & "\Audios"
Dim inputNode As Xml.XmlNode = xmlDoc.SelectSingleNode("/vmix/inputs/input[@shortTitle='" & inputName & "']")
If inputNode IsNot Nothing Then
Dim state As String = inputNode.Attributes("state").Value
Dim files() As String = IO.Directory.GetFiles(musicPath, "*.mp3")
@SysProfile
SysProfile / vMix - Auto Location Weather.vb
Last active March 12, 2025 14:03
vMix Script Weather Information with Automatic Location Detection
'Cómo se utiliza el código
'How to use the code
'
'Label: Temperature
'Dim strTemp As String = String.Format("{0:0.0}", Microsoft.VisualBasic.Val(xmlDoc.SelectSingleNode("/current/temperature").Attributes("value").Value))
'API.Function("SetText", Input:="My input", Value:=strTemp, SelectedName:="myTitle.Text")
'
'This command changes the background image:
'Dim strImage As String = "http://openweathermap.org/img/wn/" & xmlDoc.SelectSingleNode("/current/weather").Attributes("icon").Value & ".png"
'API.Function("SetImage", Input:="My input", Value:= strImage)