Jump to content

center window script


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

Recommended Posts

I have an old script for centering a window, but now on an intel mac it is not working, any suggestions?

Distance from Top

(Get ( ScreenHeight ) - Abs(Get(SystemPlatform) + 1) * 150 - Get ( WindowContentHeight )-35) / 2

Distance from Left

(Get ( ScreenWidth ) - (Get ( WindowContentWidth )+14)) / 2

//14 add to width for mac scroll bar

Link to comment
Share on other sites

I think the problem is Abs(Get(SystemPlatform) + 1)

That's like saying

Abs( 1 + 1 ) // =2 on Intel Mac

Abs( -1 + 1 ) // =0 on PPC Mac

Abs( -2 + 1 ) // =1 on Win2000 or XP

should be

Abs(Get(SystemPlatform)) + 1

Seems like it wouldn't have worked right before either!

Link to comment
Share on other sites

This topic is 6195 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.