Is it possible to get position and size of preview window by script?

zzzzzz9125 wrote on 1/29/2024, 5:17 AM

I'm writing a Vegas script that can play animations from Sprite Sheet pictures. Now the general functionality of the script has been completed. Here you can see the test video below. 👏

There's one small problem. At present, the script only fits the window size of 480*270. If your preview window is larger or smaller, the generated grid window must be adjusted manually.

I wonder if there is a way to get the position and size of the preview window, so that the grid can cover on it directly, without the manual adjustment. Is that even possible?

Last changed by zzzzzz9125

Using VEGAS Pro 22 build 248 & VEGAS Pro 21 build 208.

Information about my PC:
Brand Name: HP VICTUS Laptop
System: Windows 11.0 (64-bit) 10.00.22631
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
GPU Driver: NVIDIA Studio Driver 560.70

Comments

jetdv wrote on 1/29/2024, 8:43 AM

I see MainWindow and TimelineWindow - but no preview window.

zzzzzz9125 wrote on 1/30/2024, 8:44 AM

I see MainWindow and TimelineWindow - but no preview window.

It seems impossible to break through this problem directly, but I have just discovered that I can store some values in the registry. For example, if the user changes the position of the grid window, I can store this data in the registry, so that the last position can be read the next time the window is reloaded. It's convenient for the user.

But anyway, thanks to Edward for your tip. 👍

Using VEGAS Pro 22 build 248 & VEGAS Pro 21 build 208.

Information about my PC:
Brand Name: HP VICTUS Laptop
System: Windows 11.0 (64-bit) 10.00.22631
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
GPU Driver: NVIDIA Studio Driver 560.70