Jump to content

AS Newbie Alert -- Positioning Window


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

Recommended Posts

Hi all,

I've always tried to keep all FMP activity (scripts, etc.) entirely within FMP itself, and plugin- or AS- free. I am however finding more and more situations where it would be desirable to add some automation outside of FMP itself, in the Mac Finder or the Windows OS environments. Especially when I need to automate data exchanges between FMP and other systems (PHP/mySQL solutions for example). I'll probably be asking a bunch of rather newbie questions in the beginning -- so I appreciate your help, and patience.

In this case...

I don't need to resize any of my FMP windows (I do that within FMP), but I'd like to simply position the selected table (window), which I believe can be done by creating an Applescript, and then calling that script with a FM script.

Tech Specs: OSX 10.3.2, FMP 6

All help greatly appreciated.

Also, on side note. Most of my solutions are cross-platform. What's the Windows alternative to AS scripts?

Thanks,

Link to comment
Share on other sites

Thanks OAM. I'm guessing the syntax for those commands in AS is simple. Could you post it for me?

Also, if I set bounds I'll need to always know the exact size of the window. I was wondering if it's possible to position a window without resizing it -- by for example just indicating an X,Y coordinate for the window's top left corner?

Thanks,

Link to comment
Share on other sites

create a global repeating number field with 4 repeats. Let's call it gBounds

-- save window position:

copy bounds of window 1 to boundz

copy boundz to cell "gBounds"

-- restore window position

get data cell "gBounds"

set bounds of window 1 to result

Link to comment
Share on other sites

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