jmcc's picture
Shared by on 2020.09.26 22:10

There are two included subcompositions. One saves the window position, while the other saves the window position and window size. My original composition for capturing window position and size didn't correctly check if the file existed first, but this revised composition does.

Run the composition and change the window position or size. When the composition is started again, the window will open at the same position, with the same dimensions.

+0
Interesting
+2
Helpful
+0
Unique

Download composition

AttachmentSize
Package icon position-save-corrected.zip8.68 KB

License

Other categories

Created as a simple test or demonstration

Tested with

Vuo version:
OS version:

Comments

Thank you Jean Marie, helpful

Bodysoulspirit's picture
Submitted by

Thank you Jean Marie, helpful !

However, without the time to dive in to the sub comps, is it possible there is something with the "size + position" subcomp, where if used after a "position only" sub com it works, but if used first without the "position only" subcomp beforehand (connecting a cable to a "position only" subcomp, launch, re-connect the cable to the "position + size" subcomp, relaunch), it sets a window size of 0x0, aka you get no window ?

Also, from a non-coder perspective I don't know if there is a better way to achieve this but, are these subcompositions the end version of how Vuo will remember window size and position for exported apps ? (I guess for Vuo compositions The composition view should have the previous size and pos after pressing Stop->Run in the Editor will be used, but as micpool wrote there, will that option also work for exported apps ?)

Thanks, Bodysoulspirit.

jmcc's picture
Submitted by

Thanks, Bodysoulspirit.

It took me a bit, but my revised composition for window position and size checks if the file exists first, so it will work initially and each time thereafter. (If you've run the composition previously with the old subcomposition, and there is data in .json file, then that's what will be retrieved.)

Add comment

Log in or register to post comments