BUG: Title and Text Presets save location path wrong

bitman wrote on 1/18/2024, 4:31 AM

I thought I lost my title and text (own made) presets I had made in the previous version of Vegas (20).

I could not find nor select them in Vegas 20 or Vegas 21 anymore. After investigation I found them back in OFX Presets, but not in the correct path.

I found out that if you make a new text preference it is saved in users/<your name>/Documents/OFX Presets.

Normally this is OK I presume, but in my case, my official Documents folder path is under OneDrive:

users/<your name>/OneDrive/Documents/OFX Presets

Vegas correctly saves most stuff under the correct the OneDrive documents path location, except apparently for titles and text presets. This seems a bug. As far as I can remember I moved the documents folder to Microsoft OneDrive in the past before I installed Vegas 21.

Last changed by bitman

APPS: VIDEO: VP 365 suite (VP 22 build 194) VP 21 build 315, VP 365 20, VP 19 post (latest build -651), (uninstalled VP 12,13,14,15,16 Suite,17, VP18 post), Vegasaur, a lot of NEWBLUE plugins, Mercalli 6.0, Respeedr, Vasco Da Gamma 17 HDpro XXL, Boris Continuum 2025, Davinci Resolve Studio 18, SOUND: RX 10 advanced Audio Editor, Sound Forge Pro 18, Spectral Layers Pro 10, Audacity, FOTO: Zoner studio X, DXO photolab (8), Luminar, Topaz...

  • OS: Windows 11 Pro 64, version 24H2 (since October 2024)
  • CPU: i9-13900K (upgraded my former CPU i9-12900K),
  • Air Cooler: Noctua NH-D15 G2 HBC (September 2024 upgrade from Noctua NH-D15s)
  • RAM: DDR5 Corsair 64GB (5600-40 Vengeance)
  • Graphics card: ASUS GeForce RTX 3090 TUF OC GAMING (24GB) 
  • Monitor: LG 38 inch ultra-wide (21x9) - Resolution: 3840x1600
  • C-drive: Corsair MP600 PRO XT NVMe SSD 4TB (PCIe Gen. 4)
  • Video drives: Samsung NVMe SSD 2TB (980 pro and 970 EVO plus) each 2TB
  • Mass Data storage & Backup: WD gold 6TB + WD Yellow 4TB
  • MOBO: Gigabyte Z690 AORUS MASTER
  • PSU: Corsair HX1500i, Case: Fractal Design Define 7 (PCGH edition)
  • Misc.: Logitech G915, Evoluent Vertical Mouse, shuttlePROv2

 

 

Comments

bitman wrote on 1/18/2024, 4:35 AM

Something related, but more of a request, it is far too easy to delete a saved preset, the red cross icon to delete is next to the save icon, I would like to have a delete confirmation popup for saved presets...

APPS: VIDEO: VP 365 suite (VP 22 build 194) VP 21 build 315, VP 365 20, VP 19 post (latest build -651), (uninstalled VP 12,13,14,15,16 Suite,17, VP18 post), Vegasaur, a lot of NEWBLUE plugins, Mercalli 6.0, Respeedr, Vasco Da Gamma 17 HDpro XXL, Boris Continuum 2025, Davinci Resolve Studio 18, SOUND: RX 10 advanced Audio Editor, Sound Forge Pro 18, Spectral Layers Pro 10, Audacity, FOTO: Zoner studio X, DXO photolab (8), Luminar, Topaz...

  • OS: Windows 11 Pro 64, version 24H2 (since October 2024)
  • CPU: i9-13900K (upgraded my former CPU i9-12900K),
  • Air Cooler: Noctua NH-D15 G2 HBC (September 2024 upgrade from Noctua NH-D15s)
  • RAM: DDR5 Corsair 64GB (5600-40 Vengeance)
  • Graphics card: ASUS GeForce RTX 3090 TUF OC GAMING (24GB) 
  • Monitor: LG 38 inch ultra-wide (21x9) - Resolution: 3840x1600
  • C-drive: Corsair MP600 PRO XT NVMe SSD 4TB (PCIe Gen. 4)
  • Video drives: Samsung NVMe SSD 2TB (980 pro and 970 EVO plus) each 2TB
  • Mass Data storage & Backup: WD gold 6TB + WD Yellow 4TB
  • MOBO: Gigabyte Z690 AORUS MASTER
  • PSU: Corsair HX1500i, Case: Fractal Design Define 7 (PCGH edition)
  • Misc.: Logitech G915, Evoluent Vertical Mouse, shuttlePROv2

 

 

mamomo wrote on 10/30/2024, 7:24 PM

For some reason it does not let me save any adjustment of titles and text presets, I can erase the ones I had in the folder that you have mentioned, but I cannot create any new.

bitman wrote on 10/31/2024, 3:16 AM

@mamomo There is also another way to use titles and text with your own preset without saving a preset, and that is to use a script to create a text (with all your own text preset being generated). Here is a script I made to do just that. Feel free to change or simplify to what you need:

/**
 xSubTitles (v1)
 --------------------------- 
 This script will: 
 
 (1) V1: add default science subtitle up to 8x (selectable) 4 seconds long each 
         or add default standard subtitle up to 4x (selectable) 4 seconds long each 
 
-------------------------
 Based on Whisper openAI
------------------------- 
 Written By: bitman
 version 1
 Last Modified: 4 August 2024
 
**/

using System;
using System.Drawing;
using System.Windows.Forms;
using System.Globalization; 
using System.Collections.Generic;
using System.Collections; //needed for ArrayList
using System.ComponentModel;
using System.Threading;
using System.IO;
using System.Diagnostics;
using ScriptPortal.Vegas;
using System.Text;
//using System.Threading.Tasks;
using System.Text.RegularExpressions; 

static class Globals
{
    public static string keuze;
}

public class EntryPoint
{
    Vegas myVegas;
    public void FromVegas(Vegas vegas)
    {
        myVegas = vegas;
        bool targetFound = false; //initate candidate for event found to false
        
        //**********************************************
        //ASK : select subtitle type selection
        //**********************************************
        string title = "xSubTitles (v1)";
        string prompt = "Select NBR of Subtitles: ";
        string value1 = " ";
        Globals.keuze = "";
        if (CreateUserDialog.InputBox(title, prompt, ref value1) == DialogResult.OK)
        { 
            MessageBox.Show("testpunt 0 - should not come here- all buttons are defined CANCEL");
        }        
        //MessageBox.Show("testpunt case: " + Globals.keuze);    
        //*********************************    
        // end ask subtitle type selection
        //*********************************

        
        if (Globals.keuze != "")  // = execute code, if no selection,  cancel and do nothing!    
        {                  
            // sets timeline timecode format to "Time" 
            var originalRulerFormat = myVegas.Project.Ruler.Format;
            myVegas.Project.Ruler.Format = RulerFormat.Time;
            myVegas.UpdateUI();
            // timeline timecode format set    
            
            int myEvLength = 4; //init subtitle length to 4s (best is between 1 and 6s)
            string myText = "";
            string myText1 = "";
            string myText2 = "";
            int myType = 0; //init
            int textEvents = 0; //init
            Timecode advance = Timecode.FromSeconds(myEvLength); //advance 3s 

            foreach (Track myTrack in myVegas.Project.Tracks)
            {
                if (myTrack.IsVideo() && (myTrack.Selected))
                {                 
                    //track is Selected and event track is Video
                    targetFound = true; //candidate for subtitle is found
                                        
                    // ----------------------------------------------
                    // selected location found: start change here
                    //-----------------------------------------------
                    // MessageBox.Show("testpoint sType= " + sType );                            
                    
                    //prepare text, position and duration                         
                    //execute add text
                    
                    myType = 1;
                    myText = "S";
                    myText1 ="Konikpaarden";
                    myText2 ="(Equus caballus var. konik)";
                    

                    switch (Globals.keuze)
                    {
                        case "b1":                        
                            textEvents = 1;                                
                            while (textEvents > 0)
                            {
                                AddTextMultiStyle(myVegas, myTrack, myText1, myText2, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }                                                                         
                            break;    
                        case "b2":    
                            textEvents = 2;                                
                            while (textEvents > 0)
                            {
                                AddTextMultiStyle(myVegas, myTrack, myText1, myText2, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }
                            break;                                     
                        case "b3":                        
                            textEvents = 3;                                
                            while (textEvents > 0)
                            {
                                AddTextMultiStyle(myVegas, myTrack, myText1, myText2, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }
                            break;
                        case "b4":    
                            textEvents = 4;                                
                            while (textEvents > 0)
                            {
                                AddTextMultiStyle(myVegas, myTrack, myText1, myText2, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }
                            break;
                        case "b5":
                            textEvents = 5;                                
                            while (textEvents > 0)
                            {
                                AddTextMultiStyle(myVegas, myTrack, myText1, myText2, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }                        
                            break;    
                        case "b6":    
                            textEvents = 6;                            
                            while (textEvents > 0)
                            {
                                AddTextMultiStyle(myVegas, myTrack, myText1, myText2, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }
                            break;
                        case "b7":    
                            textEvents = 7;                                
                            while (textEvents > 0)
                            {
                                AddTextMultiStyle(myVegas, myTrack, myText1, myText2, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }
                            break;
                        case "b8":    
                            textEvents = 8;                                
                            while (textEvents > 0)
                            {
                                AddTextMultiStyle(myVegas, myTrack, myText1, myText2, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }
                            break;
                        case "b9":    
                            textEvents = 1;                                
                            while (textEvents > 0)
                            {
                                AddTextSingleStyle(myVegas, myTrack, myText, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }         
                            break;    
                        case "b10":    
                            textEvents = 2;                                
                            while (textEvents > 0)
                            {
                                AddTextSingleStyle(myVegas, myTrack, myText, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }
                            break;
                        case "b11":    
                            textEvents = 3;                                
                            while (textEvents > 0)
                            {
                                AddTextSingleStyle(myVegas, myTrack, myText, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }                
                            break;
                        case "b12":                                                        
                            textEvents = 4;                                
                            while (textEvents > 0)
                            {
                                AddTextSingleStyle(myVegas, myTrack, myText, myType, myEvLength);            
                                myVegas.Cursor = myVegas.Cursor + advance;            
                                textEvents = textEvents - 1;
                            }                         
                            break;         
                    }
         
                } //*** END of if (myTrack.is video                    
            } //*** END of foreach (Track myTrack in myVegas.Project.Tracks)
            if (!targetFound) //candidate for eventlength not found        
            {
                MessageBox.Show(" selected track must be video track");
            }
            
            // sets timeline timecode format back to the user preference 
            myVegas.Project.Ruler.Format = originalRulerFormat;
            // original format restored 

 
        } else {
            MessageBox.Show("No action was done!");
        }                        
    }
        
    //------------------------------------------------------------------------------------------------    
    void AddTextSingleStyle(Vegas myVegas, Track myTrack, string myText, int myType, int myEvLength)
    {
        string genUID = "{Svfx:com.vegascreativesoftware:titlesandtext}"; //Magix Titles & Text
        string vegVersion = myVegas.Version.PadRight(12).Substring(0,12).TrimEnd(); //to remove build version 
        //MessageBox.Show("vegVersion: " + vegVersion);
        if (vegVersion.Contains("14") || vegVersion.Contains("15") || vegVersion.Contains("16"))
        {
            genUID = "{Svfx:com.sonycreativesoftware:titlesandtext}"; //Sony Titles & Text
        } 
        
        // start of type difference
        
        string myFont = "Arial"; //init
        int myFontSize = 10;
        double myPosX = .5;      //init
        double myPosY = .1;      //init
    
        switch (myType)
            {
                case 1:                        
                    //default subtitle                         
                    myFont = "Arial";
                    myPosX = .5;
                    myPosY = .1;
                    break;    
                case 2:                        
                    //should not come here keep for future
                    break;
            }
            
        PlugInNode plugIn = null;
        plugIn = myVegas.Generators.GetChildByUniqueID(genUID);
        
        Media media = new Media(plugIn);
        MediaStream stream = media.Streams.GetItemByMediaType(MediaType.Video, 0);
        VideoEvent newEvent = new VideoEvent(myVegas.Transport.CursorPosition, Timecode.FromSeconds(myEvLength)); //myEvLength seconds long !!! 
        myTrack.Events.Add(newEvent);
        Take take = new Take(stream);
        newEvent.Takes.Add(take);
        
        //add preset to generated event
        //get the actual OFX effect  (gEffect: generated effect)
        Effect gEffect = newEvent.ActiveTake.Media.Generator;
        OFXEffect fxo = gEffect.OFXEffect;
        
        //modify Text richfont .net type properties (font, size, fontstyle, justify alignment)
        OFXStringParameter tparm = (OFXStringParameter)fxo.FindParameterByName("Text");
        RichTextBox rtfText = new RichTextBox();
        
        //rtfText.Text = " bitman has text";
        rtfText.Text = myText;
        rtfText.SelectAll();
        rtfText.SelectionFont = new Font(myFont, myFontSize, FontStyle.Bold); //Bold-Italic-Regular-Strikeout-Underline
        rtfText.SelectionAlignment = HorizontalAlignment.Center;       //alignment of text in textbox itself (=justify)
        tparm.Value = rtfText.Rtf;

        //Text font color - keep default white
        
        //Text anchorPoint        
        OFXChoiceParameter anchorPoint = (OFXChoiceParameter)fxo.FindParameterByName("Alignment");
        anchorPoint.Value = anchorPoint.Choices[4]; //4=center
        
        //Text position
        OFXDouble2DParameter position = (OFXDouble2DParameter)fxo.FindParameterByName("Location");
        OFXDouble2D Pos;
        Pos.X = myPosX;
        Pos.Y = myPosY;
        position.Value = Pos;
        
        //Text shadow
        OFXBooleanParameter shadow = (OFXBooleanParameter)fxo.FindParameterByName("ShadowEnable");
        shadow.Value = true;
        OFXDoubleParameter shadowOffsetX = (OFXDoubleParameter)fxo.FindParameterByName("ShadowOffsetX");
        shadowOffsetX.Value = 0.01;
        OFXDoubleParameter shadowOffsetY = (OFXDoubleParameter)fxo.FindParameterByName("ShadowOffsetY");
        shadowOffsetY.Value = 0.01;
        OFXDoubleParameter shadowBlur= (OFXDoubleParameter)fxo.FindParameterByName("ShadowBlur");
        shadowBlur.Value = 0.01;
        
        //Text background
        OFXRGBAParameter rgbBackground = (OFXRGBAParameter)fxo.FindParameterByName("Background");
        Color bgColor = Color.White;
        
        OFXColor bgOFXColor;
        bgOFXColor.R = bgColor.R / 255.0;
        bgOFXColor.G = bgColor.G / 255.0;
        bgOFXColor.B = bgColor.B / 255.0;
        bgOFXColor.A = 0;       // make transparant
        rgbBackground.Value = bgOFXColor;
        
        ////crop background to text (only from Vegas 19 onward)!
        //OFXBooleanParameter cropBGTT = (OFXBooleanParameter)fxo.FindParameterByName("FitBackgroundColor");
        //cropBGTT.Value = true;
        
        //Line spacing (space between lines)
        OFXDoubleParameter lineSpacing = (OFXDoubleParameter)fxo.FindParameterByName("LineSpacing");
        lineSpacing.Value = 0.8;
        
        /* helpfull to find syntax and parameters 
           foreach (OFXParameter fxparm in fxo.Parameters)
            {
                MessageBox.Show("Name: " + fxparm.Name + "  Label: " + fxparm.Label + "   Type: " + fxparm.ParameterType.ToString());
            }
        */    
        
        //apply all changes
        fxo.AllParametersChanged();                        
      
    }//*** end add text single style      
        
//------------------------------------------------------------------------------------------------    
void AddTextMultiStyle(Vegas myVegas, Track myTrack, string myText1, string myText2, int myType, int myEvLength)
    {
        string genUID = "{Svfx:com.vegascreativesoftware:titlesandtext}"; //Magix Titles & Text
        string vegVersion = myVegas.Version.PadRight(12).Substring(0,12).TrimEnd(); //to remove build version 
        //MessageBox.Show("vegVersion: " + vegVersion);
        if (vegVersion.Contains("14") || vegVersion.Contains("15") || vegVersion.Contains("16"))
        {
            genUID = "{Svfx:com.sonycreativesoftware:titlesandtext}"; //Sony Titles & Text
        } 
        // start of type difference
        
        string myFont = "Arial"; //init
        int myFontSize1 = 10;    //init
        int myFontSize2 = 10;    //init
        double myPosX = .5;      //init
        double myPosY = .1;      //init
        
        switch (myType)
            {
                case 1:                        
                    //wetenschap (science)         
                     myFont = "Roboto";
                    myPosX = .75;
                    myPosY = .18;
                    break;    
                case 2:                        
                    //for future 
                    break;
            }
            
        PlugInNode plugIn = null;
        plugIn = myVegas.Generators.GetChildByUniqueID(genUID);
        
        Media media = new Media(plugIn);
        MediaStream stream = media.Streams.GetItemByMediaType(MediaType.Video, 0);
        VideoEvent newEvent = new VideoEvent(myVegas.Transport.CursorPosition, Timecode.FromSeconds(myEvLength)); //myEvLength seconds long !!! 
        myTrack.Events.Add(newEvent);
        Take take = new Take(stream);
        newEvent.Takes.Add(take);
        
        //add preset to generated event
        //get the actual OFX effect  (gEffect: generated effect)
        Effect gEffect = newEvent.ActiveTake.Media.Generator;
        OFXEffect fxo = gEffect.OFXEffect;
        
        OFXStringParameter tparm = (OFXStringParameter)fxo.FindParameterByName("Text");
        RichTextBox rtfText = new RichTextBox();
        
        //first line (e.g. fontsize = 14 (fs28), regular)
        //------------------------------------------------
        // second line (e.g. fontsize = 10 (fs20), italic)
        //------------------------------------------------
        tparm.Value = "{\\rtf1\\ansi\\ansicpg1252\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0 " + myFont + ";}}\\viewkind4\\uc1\\pard\\lang1033\\f0\\fs28 " + myText1 + " \\b\\i\\par\\b0\\fs20 " + myText2 + "\\fs96\\par}";
     
         
        //Text font color - keep default white
        
        //Text anchorPoint        
        OFXChoiceParameter anchorPoint = (OFXChoiceParameter)fxo.FindParameterByName("Alignment");
        anchorPoint.Value = anchorPoint.Choices[4]; //4=center
        
        //Text position
        OFXDouble2DParameter position = (OFXDouble2DParameter)fxo.FindParameterByName("Location");
        OFXDouble2D Pos;
        Pos.X = myPosX;
        Pos.Y = myPosY;
        position.Value = Pos;
        
        //Text shadow
        OFXBooleanParameter shadow = (OFXBooleanParameter)fxo.FindParameterByName("ShadowEnable");
        shadow.Value = true;
        OFXDoubleParameter shadowOffsetX = (OFXDoubleParameter)fxo.FindParameterByName("ShadowOffsetX");
        shadowOffsetX.Value = 0.001;
        OFXDoubleParameter shadowOffsetY = (OFXDoubleParameter)fxo.FindParameterByName("ShadowOffsetY");
        shadowOffsetY.Value = 0.030;
        OFXDoubleParameter shadowBlur= (OFXDoubleParameter)fxo.FindParameterByName("ShadowBlur");
        shadowBlur.Value = 0.000;
        
        //Text background
        OFXRGBAParameter rgbBackground = (OFXRGBAParameter)fxo.FindParameterByName("Background");
        Color bgColor = Color.White;
        
        OFXColor bgOFXColor;
        bgOFXColor.R = 0.26;                 // bgColor.R / 255.0;
        bgOFXColor.G = 0.44;                 // bgColor.G / 255.0;
        bgOFXColor.B = 0.69;                 // bgColor.B / 255.0;
        bgOFXColor.A = 0;       // make transparant
        rgbBackground.Value = bgOFXColor;
        
        ////crop background to text (only from Vegas 19 onward)!
        //OFXBooleanParameter cropBGTT = (OFXBooleanParameter)fxo.FindParameterByName("FitBackgroundColor");
        //cropBGTT.Value = true;
        
        //Line spacing (space between lines)
        OFXDoubleParameter lineSpacing = (OFXDoubleParameter)fxo.FindParameterByName("LineSpacing");
        lineSpacing.Value = 1.0;
        
        //apply all changes
        fxo.AllParametersChanged();                        
      
    }//*** end add text multi style          
        
        

} //********* end of main procedure ********************************************************************************

public class CreateUserDialog
{
    public static DialogResult InputBox(string title, string promptText, ref string value)
    {
        // -------------------------------------------------------------
        // part 1 create form  & buttons for transcode model sellection
        // ------------------------------------------------------------- 
        
        Form form = new Form();
        Label label1 = new Label();
        Label label2 = new Label();
        Label label3 = new Label();
          //TextBox textBox = new TextBox();  //no need for textbox
        Button button1 = new Button();
        Button button2 = new Button();
        Button button3 = new Button();
        Button button4 = new Button();
        Button button5 = new Button();
        Button button6 = new Button();
        Button button7 = new Button();
        Button button8 = new Button();
        Button button9 = new Button();
        Button button10 = new Button();
        Button button11 = new Button();
        Button button12 = new Button();
        
        form.Text = title;
        label1.Text = promptText + "(Science)";
        label2.Text = promptText + "(Science)";
        label3.Text = promptText + "(Standard)";
        form.Font = new Font("Arial", 10,FontStyle.Bold);
          //textBox.Text = value;   //no need for textbox
           
          // -------------------
          // what the user sees (e.g. button2.Text = "Draft" + Environment.NewLine + "(fast)";)
          // -------------------
        button1.Text = "1";  
        button2.Text = "2";    
        button3.Text = "3";  
        button4.Text = "4";  
        
        button5.Text = "5";    
        button6.Text = "6";       
        button7.Text = "7";  
        button8.Text = "8";  
        
        button9.Text = "1";    
        button10.Text = "2";       
        button11.Text = "3";  
        button12.Text = "4";  
        
           // ---------------------- 
           //  what the user clicked
           // ----------------------
        button1.Name = "b1";  
        button2.Name = "b2";    
        button3.Name = "b3";
        button4.Name = "b4";
        
        button5.Name = "b5";  
        button6.Name = "b6";    
        button7.Name = "b7";
        button8.Name = "b8";
        
        button9.Name = "b9";  
        button10.Name = "b10";    
        button11.Name = "b11";
        button12.Name = "b12";
        
           // ----------------------- 
        button1.DialogResult = DialogResult.Cancel;
        button2.DialogResult = DialogResult.Cancel;
        button3.DialogResult = DialogResult.Cancel;
        button4.DialogResult = DialogResult.Cancel;

        button5.DialogResult = DialogResult.Cancel;
        button6.DialogResult = DialogResult.Cancel;
        button7.DialogResult = DialogResult.Cancel;
        button8.DialogResult = DialogResult.Cancel;
        
        button9.DialogResult = DialogResult.Cancel;
        button10.DialogResult = DialogResult.Cancel;
        button11.DialogResult = DialogResult.Cancel;
        button12.DialogResult = DialogResult.Cancel;

        int lab1Ypos = 20;
        int lab2Ypos = 90+28;
        int lab3Ypos = 98+90+28;
        int labXpos = 9;

        
        label1.SetBounds(9, lab1Ypos, 372, 13);       //x pos,y pos, x length, y Height 
        label2.SetBounds(9, lab2Ypos, 372, 13);       //x pos,y pos, x length, y Height 
        label3.SetBounds(9, lab3Ypos, 372, 13);       //x pos,y pos, x length, y Height 
        
          //textBox.SetBounds(12, 36, 372, 20);           //no need for textbox
     
        button1.SetBounds(labXpos, lab1Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button2.SetBounds(labXpos + 100, lab1Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button3.SetBounds(labXpos + 100*2, lab1Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button4.SetBounds(labXpos + 100*3, lab1Ypos + 28, 90, 28*2);  //x pos,y pos, x length, y Height 

        button5.SetBounds(labXpos, lab2Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button6.SetBounds(labXpos + 100, lab2Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button7.SetBounds(labXpos + 100*2, lab2Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button8.SetBounds(labXpos + 100*3, lab2Ypos + 28, 90, 28*2);  //x pos,y pos, x length, y Height 

        button9.SetBounds(labXpos, lab3Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button10.SetBounds(labXpos + 100, lab3Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button11.SetBounds(labXpos + 100*2, lab3Ypos + 28, 90, 28*2);   //x pos,y pos, x length, y Height 
        button12.SetBounds(labXpos + 100*3, lab3Ypos + 28, 90, 28*2);  //x pos,y pos, x length, y Height 


        label1.AutoSize = true;
        label2.AutoSize = true;
        label3.AutoSize = true;
        
          //textBox.Anchor = textBox.Anchor | AnchorStyles.Right;  //no need for textbox
        button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
        button2.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
        button3.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
        button4.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
        
        //form.ClientSize = new Size(477, 107);
        //form.ClientSize = new Size(420, 200+28); //x pos,y pos, (2 rows of 4 buttons each + 2x labels)
        form.ClientSize = new Size(420, 300+28); //x pos,y pos,   (3 rows of 4 buttons each + 3x labels)
        
          //form.Controls.AddRange(new Control[] { label, textBox, buttonOk, buttonCancel });  //no need for textbox
        
        form.Controls.AddRange(new Control[] { label1, label2, label3, button1, button2, button3, button4, button5, button6, button7, button8, button9, button10, button11, button12, });
        
        form.ClientSize = new Size(Math.Max(420, label1.Right + 10), form.ClientSize.Height);
    
        form.FormBorderStyle = FormBorderStyle.FixedDialog;
        form.StartPosition = FormStartPosition.CenterScreen;
        form.MinimizeBox = false;
        form.MaximizeBox = false;
        
        form.AcceptButton = button1;
        form.CancelButton = button2;
        form.CancelButton = button3;  
        form.CancelButton = button4;              
        form.CancelButton = button5;
        form.CancelButton = button6;  
        form.CancelButton = button7;  
        form.CancelButton = button8;
        form.CancelButton = button9;
        form.CancelButton = button10;  
        form.CancelButton = button11;  
        form.CancelButton = button12;         
        
        //give windows form a background color
        form.BackColor = Color.Black; 
        //give windows form text label a readable color on black
        label1.ForeColor = Color.Yellow;
        label2.ForeColor = Color.Yellow;
        label3.ForeColor = Color.Aqua; 
        
        //give buttons a meaningfull color e.g. Yellow, Aqua, Gold, Lime; 
        button1.BackColor = Color.Lime;     // 1x  multi
        button2.BackColor = Color.Yellow;     // 2x
        button3.BackColor = Color.Yellow;     // 3x
        button4.BackColor = Color.Yellow;     // 4x
        
        button5.BackColor = Color.Yellow;     // 5x
        button6.BackColor = Color.Yellow;     // 6x
        button7.BackColor = Color.Yellow;     // 7x
        button8.BackColor = Color.Yellow;     // 8x
        
        button9.BackColor = Color.Aqua;       // 1x single
        button10.BackColor = Color.Aqua;      // 2x  
        button11.BackColor = Color.Aqua;      // 3x  
        button12.BackColor = Color.Aqua;      // 4x 
        
        button1.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button2.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button3.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button4.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);    
        button5.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button6.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button7.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button8.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button9.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button10.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button11.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        button12.Click +=  new EventHandler(CreateUserDialog.Buttons_OnClick);
        
        DialogResult dialogResult = form.ShowDialog();
          //value = textBox.Text; //no need for textbox
  
        return dialogResult;
                
    }
    
   
    static void Buttons_OnClick(object sender, EventArgs e)
    //create button click event
    {
        Button btn = sender as Button;
        Globals.keuze = btn.Name;
        //MessageBox.Show("You clicked " + btn.Name);    
    }
        
}



































  

 

Last changed by bitman on 10/31/2024, 3:17 AM, changed a total of 1 times.

APPS: VIDEO: VP 365 suite (VP 22 build 194) VP 21 build 315, VP 365 20, VP 19 post (latest build -651), (uninstalled VP 12,13,14,15,16 Suite,17, VP18 post), Vegasaur, a lot of NEWBLUE plugins, Mercalli 6.0, Respeedr, Vasco Da Gamma 17 HDpro XXL, Boris Continuum 2025, Davinci Resolve Studio 18, SOUND: RX 10 advanced Audio Editor, Sound Forge Pro 18, Spectral Layers Pro 10, Audacity, FOTO: Zoner studio X, DXO photolab (8), Luminar, Topaz...

  • OS: Windows 11 Pro 64, version 24H2 (since October 2024)
  • CPU: i9-13900K (upgraded my former CPU i9-12900K),
  • Air Cooler: Noctua NH-D15 G2 HBC (September 2024 upgrade from Noctua NH-D15s)
  • RAM: DDR5 Corsair 64GB (5600-40 Vengeance)
  • Graphics card: ASUS GeForce RTX 3090 TUF OC GAMING (24GB) 
  • Monitor: LG 38 inch ultra-wide (21x9) - Resolution: 3840x1600
  • C-drive: Corsair MP600 PRO XT NVMe SSD 4TB (PCIe Gen. 4)
  • Video drives: Samsung NVMe SSD 2TB (980 pro and 970 EVO plus) each 2TB
  • Mass Data storage & Backup: WD gold 6TB + WD Yellow 4TB
  • MOBO: Gigabyte Z690 AORUS MASTER
  • PSU: Corsair HX1500i, Case: Fractal Design Define 7 (PCGH edition)
  • Misc.: Logitech G915, Evoluent Vertical Mouse, shuttlePROv2

 

 

mamomo wrote on 10/31/2024, 4:51 AM

@bitman The truth is that your script is impressive, although my problem is that when importing external subtitles, I need to always be specific characteristics, typography, background etc ... and when importing as you ask me, I could put it, but of course not I can record it, then I always have to edit and it is much more laborious.