Getting the window centered

How do you get a window to be centered no matter what your resolution is? Is their something in Interface Builder you can do? Or do you have to type in code somehow so when the app opens up the window is centered?

Thanks in advance,
Terry

Make sure your window has the “awake from nib” handler checked in IB and then add this code to your main script:

If you close this window and then reopen it later, just add the same line before you open it again, like:

Jon


[This script was automatically tagged for color coded syntax by Script to Markup Code]