Jump to content

Zoom all windows?


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

Recommended Posts

Hi, my new receptionist wants a larger interface (zoomed to 150, clicking the "big mountain" icon on all windows as they open), but the other one likes it as it is. Is there a simple way to zoom all windows at once? I know I can script each file as it opens but hoped there may be an easier way, maybe running a single script on all open windows.

Thanks.

Link to comment
Share on other sites

Why is the solution facilitated with the option of being able to open several windows. Ok a migrated solution uses several files until it's consolidated - but I would urge a ushering of all tables into one single file asap.

--sd

Link to comment
Share on other sites

Thanks Søren, I only migrated it from FMP 6 last weekend, which was a feat in itself. I'm not a developer but I've slowly made this solution over a 6 or 7 year period. I have just bought the VTC training videos and am about half way through the first beginner disc so in time, hopefully I will have the skills to make it a little less unwieldy than it is now!

In the meantime, I'd like to keep my new receptionist happy! The only way I know at the moment is by scripting the zoom into each of the files' open scripts. They are 30 files, all opened by another "opener" file and I was hoping that I could write one script into the opener file that would zoom them all as they opened.

Cheers, Murray.

Link to comment
Share on other sites

Here's 2 example files, with included AppleScripts (don't really need them, they're in the FileMaker Perform AppleScript steps also).

There's 2 different scenarios. One is starting up, or any case when there is only 1 window per file. In that case it's easy. First Open all the files. Then, using a Perform AppleScript step, get the list of databases, then call a simple FileMaker script in each, to go to 150% and Adjust Window [ Resize to Fit ]. Looks like:


	set dbs to name of databases

	repeat with db in dbs

		tell database db to do script FileMaker script "Zoom Me 150 1"

	end repeat

The FileMaker script "Zoom Me 150 1" is just:

Set Zoom Level [150%]

Adjust Window [ Resize to Fit ]

However, if you want to do this after all the databases are open, and also deal with the possibility of multiple windows per file, then you'll need a Loop script in each file, to loop through its windows. That is included in the example files.

One would think that AppleScript could loop through the windows, and it can. But it cannot call a script for each "window". Because a "script" object does not belong to the "window", it belongs to the "database." Strangely enough, using the "go to window" method works if you're outside FileMaker, but not when run within a Perform AppleScript step; it only sets the zoom level for 1 window per file (even though the script runs once per window). I guess FileMaker takes its AppleScript object hierarchy seriously ;)-]

[P.S. You could do all this on a PC. You'd just have to hard-code the Perform Script [ zoom script ] for each file. Which would be easy enough with 2 files, but with 30, kind of tedious.]

Zoom_Windows150.zip

Link to comment
Share on other sites

Thanks so much Fenton. I'll work my way through the logic and hopefully implement it as soon as possible.

I really appreciate the effort you've gone to with this.

Cheers, Muzz

Link to comment
Share on other sites

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