The Toolbar erase my Scripts

Jorge-Vegas wrote on 7/15/2023, 6:56 PM

Hello everyone!

There are two things I need help with in this thread. I am using Vegas Pro 18 on Windows 10.

On the one hand, it happens that the custom scripts that I have created and placed in the toolbar are deleted from there from time to time, and it is very strange because I have not made any changes to the directory where my scripts are stored or anything similar, besides, it took more than After a month with the scripts in the toolbar and one day they got disorganized on their own, in one Vegas project they were fine but in another they were wrong, then they weren't there anymore. I put them back but they have disappeared from the toolbar again, and it is very tedious to place and order them at all times.

On the other hand, referring to organizing scripts, it happens that I have created many scripts that do subtle things but this implies that my toolbar is very full, I need to organize the scripts to access them in a practical way. I'd like to group them by category, as many use markers, many others use video events, etc. The closest thing to this organization that I mention, I have only achieved it by putting each script in a folder with the name of the category, but to get to these folders I have to go to "Tools", then "Script Creation", then search the folder and then find the script, but there are a lot of steps and it becomes more tedious than if you had them in the toolbar.

I suppose it is possible to create a kind of Script that "groups" other scripts, that is, you click on the script that groups other scripts and it shows you a menu with the scripts of that category, but I have no idea how to achieve this. My scripts are in C# which is the only thing I have achieved without knowing how to program.

If Vegas offered the option to put script folders in the toolbar the problem would already be solved, except when it mysteriously deletes the scripts.

I greatly appreciate all your help!!

Comments

m3lquixd wrote on 7/15/2023, 7:30 PM

Use this extension here. It brings 2 new customizable toolbar!
I use it to organize my scripts.

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 3 3200G 3.60 GHz
RAM:
    32,0GB Dual-Channel DDR4 2666MHz
Motherboard:
    BIOSTAR Group B450MX-S (AM4)
Graphics:
    4095MB NVIDIA GeForce GTX 1650 (ZOTAC International)
Storage:
    465GB Seagate ST500DM002-1BD142 (SATA )
    238GB Lexar 256GB SSD (SATA (SSD))
  931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

Jorge-Vegas wrote on 7/15/2023, 8:01 PM

Use this extension here. It brings 2 new customizable toolbar!
I use it to organize my scripts.

Is free?
In any case, I see that it has many options, I just need to add categories in the toolbar to put my created scripts. You would have to delete all the ones that this tool brings. On the web I did not find the option to download only a part of what it offers, nor the option that best suits what I need.

m3lquixd wrote on 7/15/2023, 8:54 PM

The free version of the extension already entitles you to a toolbar.

It has an option that leaves it empty for you to place your scripts easily.

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 3 3200G 3.60 GHz
RAM:
    32,0GB Dual-Channel DDR4 2666MHz
Motherboard:
    BIOSTAR Group B450MX-S (AM4)
Graphics:
    4095MB NVIDIA GeForce GTX 1650 (ZOTAC International)
Storage:
    465GB Seagate ST500DM002-1BD142 (SATA )
    238GB Lexar 256GB SSD (SATA (SSD))
  931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

Jorge-Vegas wrote on 7/15/2023, 9:40 PM

The free version of the extension already entitles you to a toolbar.

It has an option that leaves it empty for you to place your scripts easily.

But which of all the scripts on that page should I try? because, for example, the "get a trial" option looks like something that gets disabled over time

jetdv wrote on 7/15/2023, 9:50 PM

@Jorge-Vegas, the short answer is that, yes, you can write a script that you would place on the toolbar that could then list scripts by category that you could then choose from. You would need to manually list each script you wanted run and what category they were in inside that script. You have to do it from a Custom Command but you can certainly call another script from the custom command:

m3lquixd wrote on 7/16/2023, 8:40 AM

@Jorge-Vegas There are 3 "versions" that are the same download file, a paid version, a demo and a free one, to know more you can read the help manual on the website.

But basically to activate the free version, just type the word "FREE" in the serial field.

About me:
Hi! Melqui Calheiros Here. I've been using Vegas as my only video editor for over 10 years. I edit professionally for various influencers, public bodies and small businesses. My goal is to squeeze Vegas to the fullest! And end the prejudice that software has here in Brazil.

⬇️ Some of my jobs. ⬇️
https://www.vegascreativesoftware.info/us/forum/post-your-vegas-creations--109464/?page=37#ca872169

PC Specs:
Operating System:
    Windows 11 Pro 64-bit
CPU:
    AMD Ryzen 3 3200G 3.60 GHz
RAM:
    32,0GB Dual-Channel DDR4 2666MHz
Motherboard:
    BIOSTAR Group B450MX-S (AM4)
Graphics:
    4095MB NVIDIA GeForce GTX 1650 (ZOTAC International)
Storage:
    465GB Seagate ST500DM002-1BD142 (SATA )
    238GB Lexar 256GB SSD (SATA (SSD))
  931GB KINGSTON SNV2S1000G (SATA-2 (SSD))

Jorge-Vegas wrote on 7/21/2023, 11:33 PM

@Jorge-Vegas There are 3 "versions" that are the same download file, a paid version, a demo and a free one, to know more you can read the help manual on the website.

But basically to activate the free version, just type the word "FREE" in the serial field.

Thank you, it complies with what you mentioned.
My scripts can be easily added, although my scripts don't appear with the icon I created for them. Anyway, I think that if I manage to create a script/custom command that launches other scripts, the icons don't show up either, which slows down the workflow.
It's so strange that you can't do something as simple as viewing the scxripts by folders, as you can do in the 'Tools>create script>"open folder" menu:

Jorge-Vegas wrote on 7/21/2023, 11:46 PM

@Jorge-Vegas, the short answer is that, yes, you can write a script that you would place on the toolbar that could then list scripts by category that you could then choose from. You would need to manually list each script you wanted run and what category they were in inside that script. You have to do it from a Custom Command but you can certainly call another script from the custom command:

I understand that the idea of the video is to use an interface where you can choose different scripts, which I haven't tried yet because another somewhat similar need arose and it should be easier:
I need a script/extension/custom command, some of them, that will run other custom scripts that are hosted in a directory that I provide.

I tried a very simple code that uses "vegas.RunScriptFile(scriptPath)" to check if it's possible to launch a script from another script/custom command but it doesn't work, I get error "HRESULT E_FAIL COM" even though the path is ok and the mentioned script works fine if I run it manually.

I know you mentioned that to launch a script you must use a custom command, which is similar to a script, but I don't quite understand the difference and I haven't been able to get something so basic to work.

As an emergency alternative, I have had to create a Script that includes the code lines of 3 other scripts, but it usually fails due to double definitions, my lack of experience, among others.

The code that I have tried and that gives me the mentioned error is the following. I tried several alternatives, like entering the path using '\\', without using '@' ,or the same code without using 'try' and 'catch (Exception ex)'. I saved this code with '.cs' extension and ran it from ''Tools>Scripting>Run Script":

using System;
using System.Windows.Forms;
using ScriptPortal.Vegas;public class EntryPoint
{
     public void FromVegas(Vegas vegas)
     {
         string scriptPath = @"full path\Marker.cs";  
       try
         {
             vegas.RunScriptFile(scriptPath);
         }
         catch(Exception ex)
         {
             MessageBox.Show(ex.Message);
         }
     }
}

And the "Marker.cs" file contains the following functional script:

usingSystem;
using System.Collections.Generic;
using ScriptPortal.Vegas;class EntryPoint
{
     public void FromVegas(Vegas vegas)
     {
         foreach (Track track in vegas.Project.Tracks)
         {
             foreach (TrackEvent te in track.Events)
             {
                 if (you.Selected)
                 {
                     Marker marker = new Marker(te.End);
                     vegas.Project.Markers.Add(marker);
                 }
             }
         }
     }
}

 

jetdv wrote on 7/22/2023, 8:15 AM

It only works from a custom command. You can't run a script from a script. You can only run a script from a custom command as shown in the video tutorial I linked.

Jorge-Vegas wrote on 7/22/2023, 9:47 AM

It only works from a custom command. You can't run a script from a script. You can only run a script from a custom command as shown in the video tutorial I linked.

Yes, I know, you said it at the beginning of your video.

 But what is wrong in the code that I have shared?  I did it with what I saw in your video, it's short because I just want to test if it works, before doing everything else.

 I don't speak English so I don't understand 100% of what's in the video.

jetdv wrote on 7/22/2023, 9:54 AM

What's wrong is that you haven't put it in a custom command.

Jorge-Vegas wrote on 7/23/2023, 10:55 AM

I tried to compile a custom command with Visual Studio but it gave me about 18 errors and I don't understand why.

 And what about does Vegas delete my scripts from the toolbar?  As much as I carefully order the scripts, I'm worried that I'll delete them again, and I haven't found a file, in Windows Explorer, that stores my toolbar layout.

 Vegas also often has trouble saving my keyboard shortcuts, sometimes it saves them and sometimes it ignores what I set, even if I only delete a default shortcut, the changes are saved even after reboot, even in the shortcuts settings file inside the Vegas older my settings have been saved, but they are not applied in my projects.

jetdv wrote on 7/23/2023, 12:37 PM

Follow the instructions in this series:

One of the videos also includes a link to a base custom command you can use to start a new project.