Most Mac Apps remember their last window position when restarting them. I can’t find a way to do this with vuo compositions exported as apps. Have I missed something, or should this be a feature request?
Also, could apps created by vuo have the option to float on top?
I am trying to find a work around with change window position but there seems to be one major problem.
I can get the size of the window from Get Window Dimensions node, but there seems to be know way of getting the current position of a window.
From Script Editor I can get it with tell application “System Events” to get the position of window 1 of application process “Vuo Composition Loader”. But if I run this in Execute Shell Command I get an Application isn’t running error, Is this the sandboxing at work?
No, there is also a Feature Request for that, and if I’m right, from the API there is not yet a way either, so you could maybe using some c code and a custom node.
Yes the Execute Shell Command node is sandboxed and pretty restricted, for security reasons.
But, why do you need to get the window position ? If you set it yourself first, then you know it later.
Joined is a composition that centers the window on the screen.
I am creating an app that will sit on screen, next to a piece of show control software, to receive prompts and run timers in response from OSC from the main show control app. If a user has several pieces of software in use on the desktop, they will be frequently moving the windows around. When they close the windows and resume later all the other applications will have opened their windows where they were last., but applications exported from Vuo won’t.
Thanks for the center example though, I can adapt that to always open the app in the top right corner of any display, which is a good default in the absence of the ability for it to save its last position.
I checked again in the API but see no function to make a custom node for it, so it’s beyond my skills.
Otherwise with a custom node that would retrieve XY positions, until a an option to save positions would pup-up, one could have saved the moved position inside a .txt file inside the app bundle and fetch it on each app launch.
Background — Places the window behind normal windows, even when it has focus. Normal— Restores the default stacking behavior, where the window is placed in front of other normal windows when it is focused, and is placed behind other normal windows when it loses focus. Floating — Places the window in front of normal windows, even when it doesn’t have focus.
We’ll post a composition in the gallery when the expanded Get Window Dimensions node is released to show how you could “remember” the last position of a window and re-open it at the same window coordinates.