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
ebjorno  
#1 Posted : Tuesday, August 13, 2019 12:38:31 AM(UTC)
ebjorno

Rank: Member

Groups: Registered
Joined: 7/20/2018(UTC)
Posts: 15
Location: Norway

Was thanked: 2 time(s) in 1 post(s)
Is there a way to loop a script in the Script Editor? By scripting I mean the Input settings>Scripting>Edit.
I want to achieve a continous wiggle/glitch effect on a camera input. I have tried to write the Function=ScriptStart&Value=test as the last line of script, but of course the script is still running, so it cannot be restarted within the same script.
doggy  
#2 Posted : Tuesday, August 13, 2019 12:50:16 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 913 time(s) in 752 post(s)
ebjorno  
#3 Posted : Friday, August 16, 2019 3:06:01 AM(UTC)
ebjorno

Rank: Member

Groups: Registered
Joined: 7/20/2018(UTC)
Posts: 15
Location: Norway

Was thanked: 2 time(s) in 1 post(s)
Since you are referring to VB scripting, Im guessing the answer is no. I have no clue how to use VB. Are there other commands than "Function" and "Sleep" for the Script Editor?
doggy  
#4 Posted : Friday, August 16, 2019 3:50:38 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 283 times
Was thanked: 913 time(s) in 752 post(s)
Quote:
Since you are referring to VB scripting, Im guessing the answer is no. I have no clue how to use VB. Are there other commands than "Function" and "Sleep" for the Script Editor?


No, the answer is yes to "Is there a way to loop a script in the Script Editor?" as referred to by the link given. each loop mentioned has a link for further explanations and example and that is how you code them in a script

referencing the vMix helpfiles there are two ways of scripting : vb.net and web scripting

Quote:
vMix Scripting supports the majority of VB.NET 2.0 code that will work within a single sub or function.
This means that custom classes and structures are not supported, however you can use the vast majority of the built in base classes in the .NET framework


for example the following is a endless loop cutting from one input to the other every 5 seconds

Quote:
Code:
Do While true

Input.Find("your input").Function("Cut")
Sleep(5000)
Input.Find("your other input").Function("Cut")
Sleep(5000)

Loop



you can have If..Then..Else statements too etc

if one want to use scripting one needs to learn a little bit of the basics of vb.net programming
AM not an expert either but google can be very helpful
cookdoeyl  
#5 Posted : Friday, January 15, 2021 2:01:35 PM(UTC)
cookdoeyl

Rank: Member

Groups: Registered
Joined: 12/12/2018(UTC)
Posts: 22
United States

Thanks: 1 times
Was thanked: 7 time(s) in 5 post(s)
Simplest way without VB:

At the bottom of your script put: "Function=ScriptStart&Value=Restart Script"
Then make another script called "Restart Script".
Put a "Sleep 100" at the beginning to make sure the main script finishes to avoid the Already Running error.
Call your script using the ScriptStart command.
Users browsing this topic
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.