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?

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. 👍