Rank: Member
Groups: Registered
Joined: 7/4/2023(UTC) Posts: 16 Thanks: 8 times
|
Hi, I need to create a counter with GT TITLE DESIGN I don't understand how to reproduce a text sequence of numbers I would like to create a counter that can decide the quantity. 0-100 0-500 etc
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,202 Location: Belgium Thanks: 291 times Was thanked: 954 time(s) in 789 post(s)
|
Originally Posted by: MaxItalia Hi, I need to create a counter with GT TITLE DESIGN I don't understand how to reproduce a text sequence of numbers I would like to create a counter that can decide the quantity. 0-100 0-500 etc Guess you might want to have a look at scripting in vMix (post "scripting for dummies") where you create a counter increaing the number displayed in the title with a value += 1 tille desired end value is reached
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/4/2023(UTC) Posts: 16 Thanks: 8 times
|
Originally Posted by: doggy Originally Posted by: MaxItalia Hi, I need to create a counter with GT TITLE DESIGN I don't understand how to reproduce a text sequence of numbers I would like to create a counter that can decide the quantity. 0-100 0-500 etc Guess you might want to have a look at scripting in vMix (post "scripting for dummies") where you create a counter increaing the number displayed in the title with a value += 1 tille desired end value is reached I don't understand how the script works that's why i want to create it with GT
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/4/2023(UTC) Posts: 16 Thanks: 8 times
|
Originally Posted by: doggy Originally Posted by: MaxItalia Hi, I need to create a counter with GT TITLE DESIGN I don't understand how to reproduce a text sequence of numbers I would like to create a counter that can decide the quantity. 0-100 0-500 etc Guess you might want to have a look at scripting in vMix (post "scripting for dummies") where you create a counter increaing the number displayed in the title with a value += 1 tille desired end value is reached I managed to get it to work. I ask is it possible to decide the speed and I need a start and pause
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,202 Location: Belgium Thanks: 291 times Was thanked: 954 time(s) in 789 post(s)
|
Originally Posted by: MaxItalia Originally Posted by: doggy Originally Posted by: MaxItalia Hi, I need to create a counter with GT TITLE DESIGN I don't understand how to reproduce a text sequence of numbers I would like to create a counter that can decide the quantity. 0-100 0-500 etc Guess you might want to have a look at scripting in vMix (post "scripting for dummies") where you create a counter increaing the number displayed in the title with a value += 1 tille desired end value is reached I managed to get it to work. I ask is it possible to decide the speed and I need a start and pause Hard to answer if we dont know how (which way) you did it
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/4/2023(UTC) Posts: 16 Thanks: 8 times
|
Originally Posted by: doggy Originally Posted by: MaxItalia Originally Posted by: doggy Originally Posted by: MaxItalia Hi, I need to create a counter with GT TITLE DESIGN I don't understand how to reproduce a text sequence of numbers I would like to create a counter that can decide the quantity. 0-100 0-500 etc Guess you might want to have a look at scripting in vMix (post "scripting for dummies") where you create a counter increaing the number displayed in the title with a value += 1 tille desired end value is reached I managed to get it to work. I ask is it possible to decide the speed and I need a start and pause Hard to answer if we dont know how (which way) you did it Code:'Total Seconds Countdown using Stopwatch as time reference
dim total as integer = 250 'Total # of seconds to count down
dim label as integer = 1
dim watch As Stopwatch = Stopwatch.StartNew()
do while label > 0
Dim elapsed As TimeSpan = watch.Elapsed
label = total - Math.Floor(elapsed.TotalMilliseconds/1000)
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=label) 'edit for own titlinput
Sleep(250)
loop
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,202 Location: Belgium Thanks: 291 times Was thanked: 954 time(s) in 789 post(s)
|
Originally Posted by: MaxItalia I ask is it possible to decide the speed and I need a start and pause
Your goal is unclear : you first say "counter that can decide the quantity. 0-100 0-500 etc"which is basically a simple nummeric value that increases from 0 to a final number In you script you are using a clock as counter reference which is limited to the fix timer speed if its actually a simple counter just simple loop with value increase will be enough, for speed one would then adjust the sleep time Code:dim i as integer
for i = 0 to 250
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=i)
sleep(500) 'half second wait = half second counter interval
next
If one wants to pause/start we simply start/stop the script but read the current value to start/continue from that is within the title allready (make sure that when script is run fo rfirst time there is an actual value in the title field !) Code:dim i as integer
i = Convert.toInt32(Input.Find(9).Text("Description.Text"))
for i = i to 250
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=i)
sleep(500) 'half second wait = half second counter interval
next
Other variations/alternatives with the same result are possible
|
|
|
|
Rank: Member
Groups: Registered
Joined: 7/4/2023(UTC) Posts: 16 Thanks: 8 times
|
Code:dim i as integer
i = Convert.toInt32(Input.Find(9).Text("Description.Text"))
for i = i to 250
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=i)
sleep(500) 'half second wait = half second counter interval
next
this is fine but it must act in reverse from 250 to 0
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,202 Location: Belgium Thanks: 291 times Was thanked: 954 time(s) in 789 post(s)
|
Originally Posted by: MaxItalia this is fine but it must act in reverse from 250 to 0
Please next time you have question be specific and very clear so correct answers can be giving (meaning do not change or add criteria after each response, opposite of your first post ) Also its best to learn some basics which one can easily find using Google search for example https://learn.microsoft....using-fornext-statements
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/23/2020(UTC) Posts: 170 Location: Wichita Thanks: 10 times Was thanked: 24 time(s) in 20 post(s)
|
Originally Posted by: MaxItalia Code:dim i as integer
i = Convert.toInt32(Input.Find(9).Text("Description.Text"))
for i = 250 to i step -1
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=i)
sleep(500) 'half second wait = half second counter interval
next
this is fine but it must act in reverse from 250 to 0 Not difficult at all. I changed just one line of the very nicely provided example.
|
1 user thanked Roy Sinclair for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 7/4/2023(UTC) Posts: 16 Thanks: 8 times
|
Originally Posted by: Roy Sinclair Originally Posted by: MaxItalia Code:dim i as integer
i = Convert.toInt32(Input.Find(9).Text("Description.Text"))
for i = 250 to i step -1
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=i)
sleep(500) 'half second wait = half second counter interval
next
this is fine but it must act in reverse from 250 to 0 Not difficult at all. I changed just one line of the very nicely provided example. it does not work
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,202 Location: Belgium Thanks: 291 times Was thanked: 954 time(s) in 789 post(s)
|
Originally Posted by: MaxItalia Originally Posted by: Roy Sinclair Originally Posted by: MaxItalia Code:dim i as integer
i = Convert.toInt32(Input.Find(9).Text("Description.Text"))
for i = 250 to i step -1
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=i)
sleep(500) 'half second wait = half second counter interval
next
this is fine but it must act in reverse from 250 to 0 Not difficult at all. I changed just one line of the very nicely provided example. it does not work it does work (be it will always count down starting from 250) ! Is why its a good idea to learn some of the basics of scriptwriting in order to realize what you did wrong or used it wrong try and specify the initial start value in the title ( to have the pause option)
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 7/4/2023(UTC) Posts: 16 Thanks: 8 times
|
Originally Posted by: doggy Originally Posted by: MaxItalia Originally Posted by: Roy Sinclair Originally Posted by: MaxItalia Code:dim i as integer
i = Convert.toInt32(Input.Find(9).Text("Description.Text"))
for i = 250 to i step -1
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=i)
sleep(500) 'half second wait = half second counter interval
next
this is fine but it must act in reverse from 250 to 0 Not difficult at all. I changed just one line of the very nicely provided example. it does not work it does work (be it will always count down starting from 250) ! Is why its a good idea to learn some of the basics of scriptwriting in order to realize what you did wrong or used it wrong try and specify the initial start value in the title ( to have the pause option) The script works fine, thanks! I ask you is it possible to run this script externally? this is because at least it is modifiable without having to act from vmix to change the parameters.
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,202 Location: Belgium Thanks: 291 times Was thanked: 954 time(s) in 789 post(s)
|
Originally Posted by: MaxItalia The script works fine, thanks! I ask you is it possible to run this script externally? this is because at least it is modifiable without having to act from vmix to change the parameters.
Sure one can by compiling the process into an external application (and its GUI ) where one has options to change certain variables if you dont want to edite the script within vMix or change readable variables within a title and change them there. It would be a good idea though to plan ahead in the future what your goal is and how to envision how to control it instead of changing them with each step of finding some solution as you have done so far which would definatly be a nightmare for any programmer one would ask to help you even for such a small functionality How one finally decide on how to process the goal wil depend on a lot of factors (what parameters need to be adjustable, frequence of adjustments to be made , other options to be available) 14 posts to reach some sort of final goal/answer: Initial question : create a counter that can decide the quantity. 0-100 0-500 etc Which then became: is it possible to decide the speed and I need a start and pause Then changed the goal: but it must act in reverse from 250 to 0 (which is a fixed parameter btw) ANd added another criteria: is it possible to run this script externally
|
1 user thanked doggy for this useful post.
|
|
|
Rank: Member
Groups: Registered
Joined: 7/4/2023(UTC) Posts: 16 Thanks: 8 times
|
I apologize for the time you wasted and that you dedicated to me. I should change the value of the initial number of the counter
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 12/27/2012(UTC) Posts: 5,202 Location: Belgium Thanks: 291 times Was thanked: 954 time(s) in 789 post(s)
|
Originally Posted by: MaxItalia I apologize for the time you wasted and that you dedicated to me. I should change the value of the initial number of the counter Ask yourself: How many times do you need to change the initial value? How many variations of this value are expected ? Does creating an external app to make a selection really benefit the flexibility of changing one value in the title by means of a shortcut ( or manually edit the title field ) ? Code:dim i as integer
i = Convert.toInt32(Input.Find(9).Text("Description.Text"))
for i = i to 0 Step -1
API.Function("SetText",Input:="9",SelectedName:="Description.Text",Value:=i)
sleep(500) 'half second wait = half second counter interval
next
The description.text field allready hold the starting value which is read by the script ( be it you cchange the initial value or its updated by stoppping/starittng the countdown)
|
|
|
|
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