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
afonia  
#1 Posted : Tuesday, December 17, 2024 2:06:32 AM(UTC)
afonia

Rank: Member

Groups: Registered
Joined: 1/12/2023(UTC)
Posts: 19

Thanks: 5 times
Hi guys!

I have a text field of a number. I use Text value +=1 or -=1 to increase/decrease it by 1 with a shortkey. It's ok.

But I also have a field with other symbols, i.e.: +4' ("plus" "4" and "apostrophe"). I need also to increase/decrease number 4 by 1. Any ideas how to make it?

P.S. Searched forum but didn't find it. Thanks!

timer forum.png (43kb) downloaded 2 time(s).
doggy  
#2 Posted : Tuesday, December 17, 2024 3:23:55 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: afonia Go to Quoted Post
Hi guys!

I have a text field of a number. I use Text value +=1 or -=1 to increase/decrease it by 1 with a shortkey. It's ok.

But I also have a field with other symbols, i.e.: +4' ("plus" "4" and "apostrophe"). I need also to increase/decrease number 4 by 1. Any ideas how to make it?

P.S. Searched forum but didn't find it. Thanks!



Probably the easiest is to change the value with your shortcut as ususal but to a hidden title text
then have a script read that value and send it as a formated text back to your title (call script with same shortcut as the one for the value change)

Something like when your title is input 1 and the Headline.Text is the one your shortcut is updating the number
Code:
Dim number = Input.Find(1).Text("Headline.Text")
dim FullText as string = String.Format("Text is +{0}' ", number)
API.Function("SetText",Input:=1,SelectedName:="Description.Text" ,Value:= FullText) 
thanks 2 users thanked doggy for this useful post.
afonia on 12/17/2024(UTC), nikosman88 on 12/17/2024(UTC)
afonia  
#3 Posted : Tuesday, December 17, 2024 10:36:05 PM(UTC)
afonia

Rank: Member

Groups: Registered
Joined: 1/12/2023(UTC)
Posts: 19

Thanks: 5 times
It works!!!

Thank you!

Can you modify this code to be able make both +1 and -1, please. Thank you again!
nikosman88  
#4 Posted : Tuesday, December 17, 2024 11:05:46 PM(UTC)
nikosman88

Rank: Advanced Member

Groups: Registered
Joined: 12/24/2021(UTC)
Posts: 543
Greece
Location: athens

Thanks: 130 times
Was thanked: 74 time(s) in 70 post(s)
Originally Posted by: afonia Go to Quoted Post
It works!!!

Thank you!

Can you modify this code to be able make both +1 and -1, please. Thank you again!

I tried it and notice that the code work both. If it goes up or down it depends on how you setup the shortcut in vmix. So if we do a shortcut +=1 will go up and another shortcut -=1 it will go down.
doggy  
#5 Posted : Tuesday, December 17, 2024 11:32:31 PM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: afonia Go to Quoted Post
It works!!!

of course it does
Quote:

Thank you!

ur welome
Quote:

Can you modify this code to be able make both +1 and -1, please. Thank you again!


@nikosman88, I believe he means the sign displayed

easy (simplest way), duplicate the script and replace the + with a - and call that script when you do a -=1

Could do some testing within the script for that too but then again would have to change it again when another wish is made ;-)
afonia  
#6 Posted : Wednesday, December 18, 2024 12:35:45 AM(UTC)
afonia

Rank: Member

Groups: Registered
Joined: 1/12/2023(UTC)
Posts: 19

Thanks: 5 times
Quote:
I tried it and notice that the code work both. If it goes up or down it depends on how you setup the shortcut in vmix. So if we do a shortcut +=1 will go up and another shortcut -=1 it will go down.


Hm, it works only for +1 shorcut. When I press -1 shortcut my Injury mins.Text field looks like this: =-1

Quote:
I believe he means the sign displayed


No. Text (+ ') remains the same. Only number should change +1 or -1 every time I press corresponding shorcut. It's for football injury time adjusting.

Here is my script.

Code:
Dim number = Input.Find(2).Text("Description.Text")
dim FullText as string = String.Format("+{0}'", number)
API.Function("SetText",Input:=2,SelectedName:="Injury mins.Text" ,Value:=FullText) 

doggy  
#7 Posted : Wednesday, December 18, 2024 12:56:03 AM(UTC)
doggy

Rank: Advanced Member

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

Thanks: 294 times
Was thanked: 960 time(s) in 794 post(s)
Originally Posted by: afonia Go to Quoted Post

Hm, it works only for +1 shorcut. When I press -1 shortcut my Injury mins.Text field looks like this: =-1



check the shortcut: value should be -=1
Users browsing this topic
Guest
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.