Hi all, I've been away from After Effects scripting for awhile, and now when I'm back I struggle with what I expect to be a simple task. I'm trying to create a new Window by clicking a button in my main Panel. However the new window closes as soon as it has been created. If I put an alert afterwards I see that it is created. Any ideas?

If the window doesnt need to be persistant, just change "palette" to "dialog".
Otherwise you need to either declare the window you want to display outside of the onClick function, either append the new window object to an already existing object.
It depends on what you want to achieve (can the new window can be instantiated more than once, etc).