User Tools

Site Tools


scripting_examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting_examples [2024/09/22 13:10] – [Changes the font colour of a specific text field depending on a numerical value] peteraelligscripting_examples [2025/11/07 21:04] (current) – [turns off all SOLOs] peteraellig
Line 485: Line 485:
 Next Next
 </code>\\ </code>\\
 +
 +===== toggle all Audio outputs=====
 +<code>
 +'Toggles on/off all Audio Busses
 +Dim busValues As String() = {"A", "B", "C", "D", "E", "F", "G"}
 +For Each value As String In busValues
 +    API.Function("BusXAudio", Value:=value)
 +Next</code>\\
 +
 +===== turn all audio outputs off (not Master) =====
 +<code>
 +Dim busValues As String() = {"A", "B", "C", "D", "E", "F", "G"}
 +For Each value As String In busValues
 +    API.Function("BusXAudioOff", Value:=value)
 +Next</code>\\
 +
 +===== turn all audio outputs ON (not Master) =====
 +<code>
 +Dim busValues As String() = {"A", "B", "C", "D", "E", "F", "G"}
 +For Each value As String In busValues
 +    API.Function("BusXAudioOn", Value:=value)
 +Next</code>\\
 +
 +===== turn on, off, toggle, Audio Master =====
 +<code>API.Function("MasterAudioOff")</code>
 +<code>API.Function("MasterAudioOn")</code>
 +oder toggle
 +<code>API.Function("MasterAudio")</code>
 +
  
 ===== gets Audio Titelname from a INPUT (Musictitle) ===== ===== gets Audio Titelname from a INPUT (Musictitle) =====
Line 729: Line 758:
 argb values and names can be found here\\ argb values and names can be found here\\
 [[https://www.w3schools.com/colors/colors_names.asp]]\\ [[https://www.w3schools.com/colors/colors_names.asp]]\\
 +
 +<fc #cd5c5c>ATTENTION: if you send the command via HTTP API, replace the # character with %23.\\
 +Example: #FF0000 becomes %23FF0000\\</fc>
 +
 +You can use HEX rgba values for one color\\
 +SAMPLE: rgba(red, green, blue, alpha)\\
 +
 +#FF0000 for red 100% visible\\
 +#FF00007F for red 50% transparent, 00 = transparent, FF = 100% visible\\
 +
 +
 ATTENTION: vmix uses colour for this command, not color\\ ATTENTION: vmix uses colour for this command, not color\\
 \\ \\
 <code>API.Function("SetTextColour",Input:="whoisonair.gtzip",SelectedName:="hg21.Text",Value:="transparent")</code>\\ <code>API.Function("SetTextColour",Input:="whoisonair.gtzip",SelectedName:="hg21.Text",Value:="transparent")</code>\\
  
-===== Changes the font colour of a specific text field depending on a numerical value =====+===== Changes the font colour of a specific text field depending on a numerical value (SetTextColour)===== 
 + 
 +<fc #cd5c5c>ATTENTION: if you send the command via HTTP API, replace the # character with %23.\\ 
 +Example: #FF0000 becomes %23FF0000\\</fc> 
 + 
 +You can use HEX rgba values for one color\\ 
 +SAMPLE: rgba(red, green, blue, alpha)\\ 
 + 
 +#FF0000 for red 100% visible\\ 
 +#FF00007F for red 50% transparent, 00 = transparent, FF = 100% visible\\
  
 If a text field displays a certain value, the text colour is changed with this script. This can be the text colour of the text field that displays the value or a different one.\\ If a text field displays a certain value, the text colour is changed with this script. This can be the text colour of the text field that displays the value or a different one.\\
Line 756: Line 805:
  
     ' depending on a value, it changes the color of the text     ' depending on a value, it changes the color of the text
 +    ' you can use any logical funktion like:
 +    ' If numericvalue < 10 Then
 +    ' If numericvalue > 10 Then
 +    ' If numericvalue < 100 Or numericvalue > 200 Then (all from 100 to 199)
 +    ' If numericvalue Mod 2 = 0 Then  (only even number)
 +    ' If numericvalue Mod 10 = 0 Then (only 10,20,30....)
 +    ' etc....
 +    
     If numericvalue = 10 Then     If numericvalue = 10 Then
         API.Function("SetTextColour", Input:="Title 0- The Classic Blue.gtzip", Value:="#FF0000", SelectedName:="Description.Text")         API.Function("SetTextColour", Input:="Title 0- The Classic Blue.gtzip", Value:="#FF0000", SelectedName:="Description.Text")
Line 769: Line 826:
 </code>\\ </code>\\
  
-===== Changes shape color of a specific shape, e.g. a circle or a rectangle(Setcolor) =====+===== Changes shape color of a specific shape, e.g. a circle or a rectangle (Setcolor) =====
 Changes shape color of a specific shape, e.g. a circle or a rectangle) (Setcolor) Changes shape color of a specific shape, e.g. a circle or a rectangle) (Setcolor)
  
Line 793: Line 850:
  
 This is a script that shows how to read the color of a shape from a title and then perform an action based on the color. The script must be started and runs in the background as a loop.  This is a script that shows how to read the color of a shape from a title and then perform an action based on the color. The script must be started and runs in the background as a loop. 
-the title used in the example can be downloaded {{ ::textshape.gtzip |here}}. +the title used in the example can be downloaded {{ ::textshape.gtzip |here}}.\\ 
-{{:gsc3.jpg?200|}}\\+{{:gsc3.jpg?600|}}\\
  
 gets the color value of a shape in a gtzip-title:\\ gets the color value of a shape in a gtzip-title:\\
scripting_examples.1727003437.txt.gz · Last modified: by peteraellig

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki