Reference > Script steps reference > Miscellaneous script steps > Send Event
 

Send Event

In Windows, performs an action in another application; in macOS, sends an Apple event to another application.

See also 

Options (Windows)

Send the <event name> message lets you choose between the following:

open document/application tells FileMaker Pro Advanced to open a document file or application. Documents are opened using the application that Windows has associated with the document's file type.

print document tells FileMaker Pro Advanced to print a document in another application.

File allows you to specify a document/application to open, or a document to print. For more information, see Creating file paths.

Calculation allows you to create a message from a calculation.

Text allows you to manually enter text for the message to be sent.

Bring target application to foreground activates the target application and display it on the screen. Displaying the target application can slow down the performance of your script. If Bring target application to foreground is not selected, the event is performed in the background.

Options (macOS)

Send the <value> event with lets you choose between the following:

open application tells FileMaker Pro Advanced to open an application. Click Specify Application to select the application.

open document tells FileMaker Pro Advanced to open a document in the target application. You can also specify a calculated value or script.

do script tells FileMaker Pro Advanced to perform a script in the language of the target application. Click Specify Application to select an application, and use Document to select the document to use with the target application. Or, select Script text and enter script text or type in the name of the script (make sure it is one that will be recognized by the target program).

other displays the Specify event dialog box, where you can manually enter the Apple event Event class and Event ID.

Document allows you to select the document you want used with the target application. For more information, see Creating file paths.

Calculation allows you to create a calculation that generates a value you want to send with the event.

Bring Target Application to foreground activates the target application and displays it on the screen. Displaying the target application can slow down the performance of your script. If Bring Target Application to foreground is not selected, the event is performed in the background.

Wait for event completion before continuing tells FileMaker Pro Advanced to wait until the event is finished before continuing. If you don't want to wait until the event is completed, deselect this option.

Copy event result to the clipboard copies the resulting events data to the Clipboard, from which it can later be retrieved. This option is disabled if Bring Target Application to foreground is selected.

Specify Application allows you to select the target application.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

No 

FileMaker WebDirect 

No 

FileMaker Server 

No 

FileMaker Cloud products 

No 

FileMaker Data API 

No 

Custom Web Publishing 

No 

Runtime solution 

Yes 

Originated in 

FileMaker Pro 6.0 or earlier

Description 

Send Event starts another application, opens a document in another application, or prints a document in another application (Windows); sends an Apple event to another application (macOS).

Each Send Event script step sends one event. You can include more than one Send Event in a script.

When specifying a document or application by calculation or text, the file type or application name will appear as <unknown> in the script definition.

Windows: For additional scripting capabilities, you can create a program in Basic or C and run that program with this script step.

macOS: When FileMaker Pro Advanced sends an Apple event, it sends text (not compiled) data. You must know what information the target application expects to receive with an event.

Example 1 

In macOS, opens the TextEdit application.

Send Event ["TextEdit", "aevt", "oapp"]

Example 2 

In Windows, opens the Notepad application.

Send Event ["aevt"; "odoc"; "NOTEPAD.EXE"]

Example 3 

In Windows, opens the image.bmp file with its default application.

Send Event ["aevt"; "odoc"; "image.bmp"]

Related topics 

Script steps reference (alphabetical list)

Script steps reference (category list)