Migrate FileMaker fmscript skill

This commit is contained in:
martin committed 2026-08-09 09:15:07 +02:00
1 parent 18a9a4cd67
commit d677b26ded
20 files changed
+424 -24

No files matched your search

@@ -0,0 +1,25 @@
# `.fmscript` script-step examples
The `examples/` directory is the authoritative catalog for this skill. Each
file contains copied fmscript lines grouped by FileMaker category. A step may
be generated only if it appears there, and its line is the required template
for its fmscript form.
| Category | Source file |
| --- | --- |
| Accounts | [`examples/Accounts.fmscript`](../examples/Accounts.fmscript) |
| Artificial Intelligence | [`examples/Artificial Intelligence.fmscript`](../examples/Artificial%20Intelligence.fmscript) |
| Control | [`examples/Control.fmscript`](../examples/Control.fmscript) |
| Editing | [`examples/Editing.fmscript`](../examples/Editing.fmscript) |
| Fields | [`examples/Fields.fmscript`](../examples/Fields.fmscript) |
| Files | [`examples/Files.fmscript`](../examples/Files.fmscript) |
| Found Sets | [`examples/Found Sets.fmscript`](../examples/Found%20Sets.fmscript) |
| Miscellaneous | [`examples/Miscellaneous.fmscript`](../examples/Miscellaneous.fmscript) |
| Navigation | [`examples/Navigation.fmscript`](../examples/Navigation.fmscript) |
| Open Menu Item | [`examples/Open Menu Item.fmscript`](../examples/Open%20Menu%20Item.fmscript) |
| Records | [`examples/Records.fmscript`](../examples/Records.fmscript) |
| Spelling | [`examples/Spelling.fmscript`](../examples/Spelling.fmscript) |
| Windows | [`examples/Windows.fmscript`](../examples/Windows.fmscript) |
Do not treat this index as a second set of examples. Read the matching source
file before using a step.
@@ -0,0 +1,63 @@
# `.fmscript` 0.90 grammar reference
Source: <https://fmscript.org/spec.html>
This is a concise working reference to the public 0.90 grammar overview. The
published page is not yet the complete script-step catalogue. When a particular
step or parameter variant is uncertain, use a known-good FileMaker/ai2fm export
or validate it with ai2fm; do not infer syntax from another step.
## Core grammar
- Give a parameterized script step exactly one bracket group containing all of
its parameters.
- Do not add brackets to a step with no parameters.
- Separate main arguments inside the brackets with a semicolon followed by a
space. Do not use a comma as the main argument separator.
- Use `# ` for a FileMaker comment step.
- Continue the same multiline comment step with `#>`.
- Use `// ` before a script step to represent a disabled step.
- Preserve `//` and `/* */` comments that occur inside FileMaker calculations.
- Qualify field references with their table occurrence, for example
`Customers::Name`. Do not emit a bare `::Name` reference.
- Prefix a local variable with one `$` and a global variable with exactly `$$`.
- Keep simple steps on one line.
- Preserve multiline calculations and determine their boundary using the known
step name, balanced brackets, and continuation structure.
## Representative forms
```text
Show All Records
Set Field [ Customers::Name ; "Ada" ]
Set Variable [ $name ; Value: Customers::Name ]
Perform Script [ Specified:From list; "Normalize Customer"; Parameter: $name ]
```
```text
# Prepare the payload
Set Variable [ $payload ; Value: JSONSetElement (
"{}" ;
[ "id" ; Customers::ID ; JSONString ]
) ]
```
The exact parameter labels and internal punctuation belong to the individual
FileMaker step definition. Verify them rather than generalizing from these
representative forms.
## Review checklist
- Use an exact, supported FileMaker step name.
- Give each parameterized step one balanced outer bracket group.
- Keep calculation parentheses and internal brackets balanced.
- Use semicolons for main arguments.
- Fully qualify every field reference.
- Use `$` and `$$` variables correctly.
- Close every structured block with the complete matching FileMaker closing
step.
- Preserve comment steps, disabled steps, and calculation comments correctly.
- Preserve multiline calculation boundaries.
- Apply the project's formatting, naming, path, and output-only requirements.
- Validate uncertain or version-specific syntax through ai2fm or a known-good
export before describing the script as round-trip ready.