TITLE
    Opening Networked Databases Using AppleScript
Article ID:
Created:
Modified:
55989
6/14/94
3/12/99

TOPIC

    Alternatives to using System 7 Aliases to open networked files

    This information was provided by Claris Corporation on 16 March 1998, and incorporated into Apple Computer's Tech Info Library.


DISCUSSION

    FileMaker Pro offers many ways of automating the opening of documents, applications, and databases. Here is a way to open a FileMaker Pro database that is being shared over the network using ScriptMaker and a scripting tool such as AppleScript. This method allows you to open a database automatically through Apple Events just as if you had clicked on the network button in the Open dialog.

    1) Create a script with ScriptMaker that opens the shared database. As an example we will call this script Open Network Database. To create the script, select the Open step, click on specify, and then click on the network button. Select the file that is being shared over the network. You will see the zone listed next to the file name when viewing the script steps.

    Script name: Open Network Database
    Open ["Contacts.FM (Marketing Zone)"]

    2) Launch the script from a scripting utility using the Do Script event. With AppleScript you would create an applet with the following statements:


    tell application FileMaker Pro
    Do Script FileMaker Script "Open Network Database"
    end tell

    ALTERNATE METHOD- Using AppleScript.

    Within AppleScript you can open databases within your current zone using the command:
    Open file "Contacts.FM" of
    zone "Marketing Zone"

    The use of [of zone "zonename"] is optional. Opening files from another zone using this methodology does not work (for FileMaker Pro 2.1v3 or later).

    As a workaround, set your network protocol to MacIPX or TCP/IP. These network protocols do not have zones.


Document Information
Product Area: Apple Software
Category: Claris Software
Sub Category: Other Applications

Copyright © 2000 Apple Computer, Inc. All rights reserved.