AI Script Editor
Generate FileMaker scripts using AI and copy them directly to FileMaker clipboard.
Summary
- Purpose: Generate FileMaker scripts from natural language prompts and copy them directly to FileMaker clipboard
- Audience: Developers, scripters
- Prereqs: AI Accounts and Models configured, BaseElements plugin installed, Ottomatic AI Runtime enabled
Experimental Feature
This feature is experimental and can make mistakes. Please double-check all generated scripts before using them in production. Always review the generated code for accuracy, security, and best practices.
Overview
The AI Script Editor allows you to generate FileMaker scripts by describing what you want in natural language. ProofChat's AI analyzes your request and generates a complete, well-commented FileMaker script that you can copy directly to your FileMaker clipboard and paste into Script Workspace.

Requirements
BaseElements Plugin
The AI Script Editor requires the BaseElements plugin to copy scripts to FileMaker clipboard. The plugin provides clipboard functionality that allows ProofChat to set script steps directly on FileMaker's clipboard.
Installation: Download and install BaseElements from the BaseElements Plugin GitHub repository.
BaseElements Plugin
BaseElements is a free FileMaker plugin that provides enhanced clipboard functionality and other utilities. The AI Script Editor uses BaseElements functions to copy generated scripts directly to FileMaker's clipboard format.
Ottomatic AI Runtime
The AI Script Editor requires Ottomatic AI Runtime to function. This runtime provides the necessary infrastructure for advanced features including automatic tool result submission, enhanced streaming, and server-side processing capabilities that enable the AI Script Editor to work seamlessly.
Why Ottomatic AI Runtime?
- Automatic tool result submission: Script generation results are automatically processed and submitted
- Advanced streaming: Enhanced real-time processing for complex script generation
- Server-side capabilities: Specialized processing required for FileMaker XML generation
- Multiple AI provider support: Access to Anthropic, OpenAI, and more providers (coming soon)
Runtime Requirement
The AI Script Editor will not function with FileMaker Runtime. You must enable Ottomatic AI Runtime to use this feature. To enable Ottomatic AI Runtime:
- Navigate to Settings → Chat Runtime 2. Select Ottomatic AI Runtime 3. Click Select to activate 4. The application will reload with the new runtime License Access: Ottomatic AI Runtime is available on free licenses (25 requests per 24 hours) and ProofChat Pro (higher limits). See Pricing and Licensing for details.
How It Works
Basic Workflow
- Type your request: In the ProofChat interface, describe the script you want to create (e.g., "Create a script that finds all customers in California and sets their status to active")
- AI generates the script: ProofChat analyzes your request and generates a complete FileMaker script with proper formatting, comments, and error handling
- Review the script: The generated script appears in a tool panel with syntax highlighting and line numbers
- Copy to FileMaker: Click the "Copy to FM" button to copy the script directly to FileMaker's clipboard
- Paste in Script Workspace: Open FileMaker Script Workspace, create a new script, and paste (Cmd+V / Ctrl+V) to insert the script steps
Script Generation Features
The AI Script Editor generates scripts that:
- Follow FileMaker scripting best practices
- Include helpful comments explaining what each section does
- Handle errors appropriately
- Use proper variable naming conventions
- Include appropriate script step parameters
Model Configuration (Optional)
For optimal performance and cost efficiency, you can configure specialized models for the script generation process. These are optional—if not configured, ProofChat will use your "Main Chat" model.
Available Model Purposes
FM-Script-Step-Classifier
Purpose: Classifies individual script steps to identify their type and structure.
Recommendation: Use a smaller, faster, and more cost-effective model for this task. Classification is a simpler task that doesn't require the full capabilities of larger models.
Examples: gpt-4o-mini, gpt-3.5-turbo, or similar smaller models
FM-Script-Step-XML-Generator
Purpose: Generates FileMaker XML clipboard format from script step text.
Recommendation: Use a smaller, faster, and more cost-effective model for this task. XML generation follows a structured format that smaller models handle well.
Examples: gpt-4o-mini, gpt-3.5-turbo, or similar smaller models
Configuring Optional Models
- Open ProofChat and navigate to Settings → AI Accounts
- Scroll to Model Assignments (bottom of the page)
- Find FM-Script-Step-Classifier in the list
- Select your preferred provider (e.g., OpenAI)
- Choose a smaller, faster model (e.g.,
gpt-4o-mini)
- Find FM-Script-Step-XML-Generator in the list
- Select your preferred provider (e.g., OpenAI)
- Choose a smaller, faster model (e.g.,
gpt-4o-mini)
- Save your changes
Fallback Behavior
If you don't configure these optional model purposes, ProofChat will automatically use your "Main Chat" model for script generation. This works fine but may be slower and more expensive than using specialized smaller models.
Usage Examples
Example 1: Simple Script Generation
Prompt: "Create a script that finds all records where Status equals 'Active' and shows a count"
Result: The AI generates a script with:
- Enter Find Mode step
- Set Field for Status
- Perform Find
- Show Custom Dialog with found count
- Error handling
Example 2: Complex Script with Variables
Prompt: "Create a script that loops through found records, calculates a total, and sets a global variable"
Result: The AI generates a script with:
- Find logic
- Loop structure
- Variable calculations
- Set Variable steps
- Proper loop exit conditions
Best Practices
- Always review generated scripts: Even though the AI follows best practices, always review scripts before using them in production
- Test in a development environment: Test generated scripts in a safe environment before deploying
- Be specific in your requests: More detailed prompts lead to better script generation
- Use smaller models for classification/generation: Configure the optional model purposes with smaller models to save costs and improve speed
- Keep BaseElements updated: Ensure you're using a recent version of BaseElements plugin
Troubleshooting
"Copy to FM" Button Doesn't Work
- Check BaseElements installation: Ensure BaseElements plugin is installed and enabled in FileMaker
- Verify script permissions: The
setFMClipboardscript must be accessible and executable - Check FileMaker version: Ensure you're using FileMaker 21 or later
Generated Scripts Have Errors
- Review the script: Check for syntax errors or missing parameters
- Try rephrasing your prompt: More specific prompts often yield better results
- Break complex requests into smaller parts: Generate scripts in steps rather than one large script
Model Configuration Issues
- Verify model assignments: Check Settings → AI Accounts → Model Assignments
- Test model connection: Ensure your AI provider account is connected and working
- Check model availability: Verify the model you selected is available in your provider account
Related
- AI Accounts and Models - Configure AI models and providers
- Tools are Scripts - Understanding how tools work in ProofChat
- BaseElements Plugin Documentation - BaseElements plugin reference