Reference > Script triggers reference > OnFirstWindowOpen
 
OnFirstWindowOpen
Performs a script each time you open a window of a database file when no other windows for the file are open.
When the script runs
After the first window of a file is opened.
Modes in which the trigger can be used
OnFirstWindowOpen activates before FileMaker Pro enters a mode.
Result
None.
Compatibility 
 
Where the script trigger is activated 
Supported 
FileMaker Pro 
Yes 
FileMaker Server 
Yes 
FileMaker Go 
Yes 
Custom Web Publishing 
Yes 
FileMaker WebDirect 
Yes 
Runtime solution 
Yes 
Originated in
FileMaker Pro 12.0
Notes
This trigger is activated when the first window is created for a file directly, either manually or via the Open File script step. If a file is opened with a hidden window via a relationship or a script, this trigger doesn’t activate until a window is created directly. However, performing a script in another file does not activate this trigger in that file even if the script creates the first window for that file. To have this trigger activate in another file, open the other file using the Open File script step before performing the script in that file.
Related topics 
Setting up script triggers
Setting script triggers for layouts
Setting script triggers for objects