Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Genie Windows

Featured Replies

I'm interested in the "genie" effect. Making new windows fold out when opening and collapse into themselves when closing.

My navigation scripts are getting more and more involved so as the nature of database building. So I am looking for the cleanest, simplest way of achieving this effect.

Thank you all!

  • Author

Hello,

I have created a new model file and updated the post at:

http://www.fmforums.com/forum/showtopic.php?tid/178990/

Thank you all for all your help and hope all is well with you all.

  • Author

:oops:

above link is bad. I'm at home now, and do not have the file on me that was attached. I will attach the file I mentioned to this thread tomorrow.

rock on

  • Author

The attached file is "kinda" working, but has some problems

with window sizing.

There are additional notes in the file.

Thanks!

Edited by Guest
Removed outdated file

Regarding the notes in your file, you can set a variable at the top of the script to, for example:

Get ( WindowHeight ) - 50

And then exit the loop when the height is greater than the variable.

Regarding centering the window horizontally relative to another window, you can get the left position and width of the windows... the center point is half the width... a little mathematical ponder... the left of new window would be the the left of the old, plus the difference of the two widths divided by 2: leftA + (widthA - widthB)/2

  • Author

Hello, I have attempted to work in the new clc's and I'm having problems Getting parameters for the NEW window. My clc's keep using Getting from Parent window and I do not know how to Get for NEW window.

I have attached updated FM file and screen shots of the two major scripts for reference. Problems are also noted within file scripts and fields.

PROBLEMS WITH WindowShade SCRIPT:

- New window is resized correctly. Resizing to parent window instead of “resizing to fit” its own.

- New window is NOT positioned center relative to parent window. The Get functions are getting parent coordinates and not the new window coordinates.

- Loop ends once OLD window size is met, not NEW window size

Any Suggestions? THANKS A HEAP!

:bang:

WindowGenie.fp7.zip

WindowShadeScript.jpg

Your calc <> my calc.

Mine: leftA + (widthA - widthB)/2

Yours: leftA + widthA - widthB/2

  • Author

Opps,

the centering from left to right in relation to parent works now that the () have been added.

I still have the problem of resizing new window to fit it's own. Currently new window is opening the same size as the parent, the new window is smaller.

Any ideas?

I don't quite follow your grammar, but it looks like you're exiting the resize loop when the window reaches the parent window's height.

I don't think you'll be able to zoom the new window and get its height without a screen flash -- try it -- so you'll need to get the desired height in advance and hard-code it into the script.

  • Author

sorry if I am confusing.

I knew I could hard code it in, but was trying to avoid it so I could make a more generic window genie script for all new sub windows throughout solution. If I hard code it in, I will have a grip of coordinates to enter.

I will look into my script again with fresh eyes and see what I can work up.

Thank you for your time!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.