Jump to content
Server Maintenance This Week. ×

Problem with Applescript and FileMaker Pro 9.0v3 and Leopard


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

Recommended Posts

  • Newbies

I've been running an apple script with FM6 for years. Moving to 9 now, revising for this release. In AS, some "set variable to cell" statements are not picking up values. When I explore the data base with Script Debugger, it is not showing some values either. Are there issues between AS and FM in this new release that are causing these problems?

Link to comment
Share on other sites

Well, you haven't given us the full context of your AppleScript, but there are several differences between the AppleScript implementation in FileMaker 6 and FileMaker 7+. First, FileMaker 7+ can have multiple tables and FileMaker 6 could not. Hence you sometimes need to be more explicit.

If FileMaker is not on a layout that has the "cell", then you need to use either a "layout" or "table" reference to target the field, and they are not exactly the same thing either; "table" in AppleScript, BTW, is a name of a FileMaker table occurrence, not the name of a FileMaker base table; clear as mud :-?.

You really need to study the new object hierarchy to see what belongs to what. Like many things in FileMaker 7+, context is important. Look at the "Apple Events Reference.fp7" file, in the Apple Events folder, in your FileMaker application folder.

Another change that screwed up a lot of my AppleScripts was a subtle change to the document index. The phrase "document 1" means "the first document you opened this session," NOT necessarily "front document". Whereas "window 1" is still the front window.

There is a default of the frontmost document and layout. So, you can avoid having to specify layout or table if you are on, or flip to a layout with the fields you need. Then you can just say:

cell "Name" of current record

Link to comment
Share on other sites

  • Newbies

Working now. Probably two problems. I had Tell Window "Listserv Lists". Changed to Tell Current Record. Looks like target record of window is 1, not current. Can't remember where these rules are discussed. Are they in the Apple Events Reference?

Link to comment
Share on other sites

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