Help

Table Of Contents
Creating scripts to automate tasks
F
ILEMAKER PRO HELP 430
Scripting with ActiveX Automation (Windows)
Many Windows applications use the ActiveX Automation protocol to expose their object models for
external control.
ActiveX Automation support in FileMaker Pro allows you to open and close FileMaker Pro database
files, toggle the application’s visibility, and run FileMaker
Pro scripts.
FileMaker Pro is an automation server. The objects FileMaker Pro exposes for automation can be
accessed by any ActiveX client or Automation controller, including as Visual Basic and other similar
programming tools.
The primary benefit of ActiveX Automation in FileMaker Pro is the ability to initiate FileMaker Pro
scripts from outside of the FileMaker
Pro application.
For example, with FileMaker Pro ActiveX Automation and Visual Basic you can create your own
application (with its own interface) and drive multiple applications to accomplish a task. For example
you could define a window in Visual Basic that has one button that says, "Get today’s sales data."
The procedure for "Get today’s sales data" would open a FileMaker
Pro file and, by calling a
FileMaker
Pro script, find and export all of that day's sales data. The Automation procedure would
then start up Excel and graph the exported data.
Note To implement ActiveX Automation with FileMaker Pro, you need to be proficient in a
programming language such as Visual Basic or C++.
Using FileMaker Pro ActiveX Automation (Windows)
The FileMaker Pro Type Library
The type library describes the objects, properties, and methods exposed by FileMaker Pro, so that
other ActiveX clients can access FileMaker
Pro.
The FileMaker Pro Type Library is included in the FileMaker Pro executable. It is not a separate file.
The FileMaker
Pro Type Library was registered on your computer when you installed FileMaker Pro.
In Visual Basic, add "FileMaker Pro Type Library" to the list of Available References in your project.
Important You must add the FileMaker Pro Type Library to the list of available type libraries in the
application you will be using to implement your ActiveX Automation document. If you don't add the
type library, you won't be able to address FileMaker Pro via ActiveX Automation.
The method for adding this library varies in the different ActiveX Automation authoring tools. Consult
the manual that came with your ActiveX Automation authoring tool if you are unsure of how to do
this. The following procedure explains how to do this in Microsoft Visual Basic.
To add the FileMaker Pro Type Library to Microsoft Visual Basic:
1. In Microsoft Visual Basic, choose Project menu > References > Add Type Library.
2. Enable the checkbox to the left of the FileMaker Pro Type Library.
3. Click OK.
FMPro70Lib appears in the Visual Basic Object Browser once the project references include the
FileMaker
Pro Type Library. All of the objects, methods and properties that FileMaker Pro exposes
for Automation control are now available.