Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I've been using this calculation, where I know that I want the WindowWidth to be 1000 pixels wide.

(Get ( WindowDesktopWidth ) / 2) - (Get ( WindowWidth ) / 2)

This calculation can't seem to set the left position correctly when called as the script performed on open, as the WindowWidth hasn't been set until within this script step.

It does work, if the script is manually activated, once the screen has been correctly sized but incorrectly positioned from start up.

For now, I know that we want the window width to be 1000 and / 2 of this is 500

Therefore

(Get ( WindowDesktopWidth ) / 2) - 500

works on start up . . .

To test this, open the attached file, drag the open window to the right (like a user may do) so you can't see the right half of the window, close the file then open it again. Then run the first script (which is called on opening the file) and it works.

Then repeat the process, only this time setting the second script as the open script, which has the left position hard coded, and it works every time.

WindowDesktopWidth.zip

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