Jump to content

Open New Window Position

This topic is 5605 days old. Please don't post here. Open a new topic instead.

Recommended Posts

How can I position a newly opened secondary window in relation to parent window?

Thank you all for viewing this question. I am putting the final touches on my life time spent DB. Want the windows to work like a professional application. I wish the new window to open centered horizontally w/ parent window and just below top of parent window.

Also, I'm interested in the "genie" effect. Making windows collapse into themselves until closed.

Any suggestions, tips, or direction would be greatly appreciated.

Thanks again!!!

Link to comment
Share on other sites

Dr. Evil:

For an absolute window location, you can use the Move/Resize Window script step.

To open the window in a location relative to the other window, you can use AppleScript to find the first window's location & size, and locate your second window relative to that information.


Link to comment
Share on other sites

the word AppleScript kinda freaks me out sense i am very unfamiliar with it.

I need help setting up the script, clc's and all that goodness.

If you like, you can join me for a chat using this site's menu




Link to comment
Share on other sites

I had an idea that I thought may work on this.

The ideas is to create global parameter fields

and have my OpenWindow script set the glb fields with parent window coordinates

then script would use these glb coordinates to position new window.

So once I have these numbers, how do I us them to move and position window?


Link to comment
Share on other sites

Check out this file (attached).

It captures the Top and Left window posistion and then creates a new window with the top and left offset by 100 pixes.

Drag the window around and run the script, you'll see the child window's position is always relative to the parent.


Link to comment
Share on other sites

Hello Wim,

Thanks for the great tip. I have done some research and have found similar solutions. I could simply copy, paste and make your script work for my DB. But I would like to understand was is going on and the power of "Set Variable".

What function is the symbol $

I see _parentTop in specify > Name


as you said, the script will work over and over and you have change the name of the window title...

so, I guess I am hoping for some explanation and insight.

Thank you very much for your time!!!

Link to comment
Share on other sites

The $ symbol means that the variable will only "live" in the script it has been declared in. When the script stops, the value is lost.

A global variable (using the $$ symbol) stays alive inside a file until that file is closed.

Check the FM help file for some good info on variables.

The script in my demo works over and over because any script executes in the context of your current active window and layout. It's up to you - the developer - to make sure your scripts can only be executed when you intended them to. (limiting access to menus, a tightly scripted user navigation,...)

Link to comment
Share on other sites


You have been a wonderful help! I will begin working it in and reading up on variables.

Have a great day/evening!


Link to comment
Share on other sites

This topic is 5605 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.