When executing the script, How to method hide(min) of "vegas pro" app

Taeyoung-Kim wrote on 12/2/2020, 8:08 PM

Hi, everyone!

When executing the script from the command line, "vegas pro" application is displayed on the screen and run the script.
When executing a script from the command line, is there a way to hide(or minimized) the vegas pro application and run the script in a hidden(or minimized) state?

Comments

jetdv wrote on 12/3/2020, 8:36 AM

Maybe something like this toward the beginning of your script? (not tested!):


 

        private const int SW_MAXIMIZE = 3; 

        private const int SW_MINIMIZE = 6;

        [DllImport("USER32.DLL")]
        public static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommands nCmdShow);

        ShowWindow(Vegas.MainWindow.Handle, SW_MINIMIZE);

 

wwaag wrote on 12/3/2020, 12:19 PM

Assuming that you are using C#, you also need to add this using statement.

using Microsoft.Win32;

 

Last changed by wwaag on 12/3/2020, 12:20 PM, changed a total of 1 times.

AKA the HappyOtter at https://tools4vegas.com/. System 1: Intel i7-8700k with HD 630 graphics plus an Nvidia RTX4070 graphics card. System 2: Intel i7-3770k with HD 4000 graphics plus an AMD RX550 graphics card. System 3: Laptop. Dell Inspiron Plus 16. Intel i7-11800H, Intel Graphics. Current cameras include Panasonic FZ2500, GoPro Hero11 and Hero8 Black plus a myriad of smartPhone, pocket cameras, video cameras and film cameras going back to the original Nikon S.

Taeyoung-Kim wrote on 12/6/2020, 9:35 PM

Maybe something like this toward the beginning of your script? (not tested!):


 

        private const int SW_MAXIMIZE = 3; 

        private const int SW_MINIMIZE = 6;

        [DllImport("USER32.DLL")]
        public static extern bool ShowWindow(IntPtr hWnd, ShowWindowCommands nCmdShow);

        ShowWindow(Vegas.MainWindow.Handle, SW_MINIMIZE);

 

Thank you very much!!! :)

it works fine. :)