vMix Forums
»
General
»
General Discussion
»
Help for a beginner who would like to write simple scripts
Rank: Newbie
Groups: Registered
Joined: 8/23/2020(UTC) Posts: 4 
|
Good evening, first of all I am not a programmer but I would like to learn slowly and so I am trying with visual basic to create some scripts for Vmix. As a test script I am trying to make it so that when I press the v key on the keyboard the output switches from camera 1 to the first video contained in a list. The script code however seems to absolutely not want to digest the End Sub closure, even if it seems to be regular. Who can help me? This is the code: Tks Andrew
Dim HD_Webcam_PC_Frontale As String = "HD Webcam PC Frontale" Dim listInputName As String = "List" ' Assicurati che il nome della tua lista sia proprio "List"
'-- Imposta la telecamera all'inizio API.Function("CutDirect", Input:=HD_Webcam_PC_Frontale)
'-- Gestione degli eventi della tastiera Sub OnKeyDown(Key) If Key = 86 Then ' 86 è il codice ASCII per il tasto "v" API.Function("ListPlayIndex", Input:=List, Value:="0") ' Riproduce il primo video (indice 0) End If End Sub
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,354  Location: Belgium Thanks: 300 times Was thanked: 989 time(s) in 821 post(s)
|
Originally Posted by: visioneimmagine  Good evening, first of all I am not a programmer but I would like to learn slowly and so I am trying with visual basic to create some scripts for Vmix. As a test script I am trying to make it so that when I press the v key on the keyboard the output switches from camera 1 to the first video contained in a list. The script code however seems to absolutely not want to digest the End Sub closure, even if it seems to be regular. Who can help me? This is the code: Tks Andrew
Dim HD_Webcam_PC_Frontale As String = "HD Webcam PC Frontale" Dim listInputName As String = "List" ' Assicurati che il nome della tua lista sia proprio "List"
'-- Imposta la telecamera all'inizio API.Function("CutDirect", Input:=HD_Webcam_PC_Frontale)
'-- Gestione degli eventi della tastiera Sub OnKeyDown(Key) If Key = 86 Then ' 86 è il codice ASCII per il tasto "v" API.Function("ListPlayIndex", Input:=List, Value:="0") ' Riproduce il primo video (indice 0) End If End Sub
you can not have subs or functions within a vMix vb.net script ! There is post regarding scripting with lots of examples , https://forums.vmix.com/...86-Scripting-for-Dummies
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Help for a beginner who would like to write simple scripts
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.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close