-
Notifications
You must be signed in to change notification settings - Fork 1
How to
This page explains how to do stuff in FileMaker with fmAutoMate.
Use the Pages menu to the right to navigate to the entries.
The first time…
- Open fmAutoMate
- Press the big green [fmAutoMate] button
After that you only need to turn HotKeys back on.
You can just read the documentation in the fmAutoMate Function Reference Wiki, or
- Open a Script in the FileMaker Script Workspace
- Right click on a step
- Take a look at the fmAutoMate context menu
-
The top half (
1 of 160 selected
and above) is provided by the MBS Plugin -
The bottom half (
fmAutoMate
and below) is provided by fmAutoMate -
Under
fmAutoMate > Help
you can find a short description of each function- Click it to jump to its documentation on the [fmAutoMate Function Reference Wiki](https://github.com/mrwatson- - The various
Clipboard > …
menus provide various functions to manipulate your clipboard, particularly the nifty Xut, Xopy & PaXte actions
- Click it to jump to its documentation on the [fmAutoMate Function Reference Wiki](https://github.com/mrwatson- - The various
-
Under
Code > …
you can find functions to analyse, manipulate and refactor your code, or load & save snippets -
Under
Find & Replace > …
you'll find functions and HotKeys for some very useful script workspace functionality! de/fmAutoMate/wiki/fmAutoMate-Function-Reference) page.
-
- Select a bit of code that you regularly use
- Press
⌃⌘S
to save a snippet- Just give it a meaningful name and you're done
- Repeat with further code
- Script steps
- Scripts
- Layout objects
- Standard fields
- Custom Functions
- Whatever!
When you need one of your snippets
- Press
⌃⌘L
to load a snippet - Choose a file
fmAutoMate has a bunch of HotKeys to accelerate navigating around your databases
- To quickly navigate to a different layout just press
⌃⇧Q
- To navigate to another window just press
⌃⇧W
- To switch back to the previous window (window #2) press
⌃⇧2
- To bookmark and navigate to a window (main window #1) press
⌃⇧1
- The first time you press
⌃⇧1
the current window is bookmarked - Pressing
⌃⇧1
from another file will navigate back to your main window - Pressing
⌃⇧1
again in your main window, or when your main win
- The first time you press
- To reopen fmAutoMate (for example to turn HotKeys off) just press
⌃⇧A
Note: These navigation keys use ⌃⇧
(control+shift) whereas most other fmAutoMate functions use ⌃⌘
(control+command)
After closing and restarting FileMaker the fmAutoMate menu is retained, but the HotKeys are, sadly, forgotten.
To turn the HotKeys back on
- Right Click on a script step
- Choose fmAutoMate > HotKeys On
or
- Open fmAutoMate
- Click the [fmAutoMate] Button on the start page
fmAutoMate HotKeys are currently defined globally on your computer, not just in FileMaker / Script Workspace.
If this interferes with your other apps you can turn HotKeys off in 3 different ways:
- by pressing the extended key combination:
⌃⌘K
off
return
- by opening fmAutoMate (
⇧⌃A
) and pressing the[X HotKeys Off]
button - by selecting
fmAutoMate > HotKeys Off
in the fmAutoMate context menu in the script workspace.
Note: The Insert Pseudocode function needs the latest release of the fmCheckMate-XSLT library
-
Press
⌃⌘P
to insert some pseudo code-
A dialog input appears, where you can type some pseudocode
-
-
Type - or insert - some pseudocode. Try this:
$r=1 $i=1 $n=10 Loop Exit Loop If [ $i>$n ] $r = $r * $i $i = $i + 1 End Loop Show Custom Dialog [ $n & " factorial is " & $r ]
Please Note
- The Insert Pseudocode function has some important limitations.
- It works on one line at a time.
- It can thus only handle single-line calculations.
- It can't handle calculations containing a ']'.
- If it can't handle a line it inserts it as a comment
- If it fails to paste steps, remove any multiline calculations/steps and try again
fmAutoMate's Code > Insert > History Comment
function makes documenting changes really slick:
- Just press
⌃
⌘
H
- A dialog appears, where you can input
- A comment
- A preferred memory duration
- Your preferred name/handle
- Your preferred date format
- Your preferred optional line prefix, like
@history
When you click OK, fmAutoMate
-
inserts a script comment formatted like this:
«prefix»
«date»
«name»
«comment»
Moreover, fmAutoMate
- remembers your preferences (so the next time your preferences are automagically preset!)
- remembers the comment for the duration you set (so you can reinsert the same comment into multiple places!)
This is how I format FileMaker script comments to be compatible with GitHub documentation:
- I format my history comments as markdown to work well with GitHub
- I use MBS
Copy Selection
to copy the script step text and paste into- GitHub commit messages
- GitHub release documentation
- GitHub issues documentation
- GitHub Wiki documentation and correspondence (tweets)
- I create multiple line comments with an optional summary on the first line and (markdown) list items on following lines
- The main line (starting with a FileMaker
#
comment symbol) is displayed automatically as a heading - The list items (starting with a
-
) are displayed as a list
- The main line (starting with a FileMaker
- I use my GitHub handle
@mrwatson-de
- This is automatically converted to a link to my GitHub user page
- I use GitHub referencing styles to automatically link to issues
For example
# 20221027 @mrwatson-de v0.43
- Improved Menus and HotKeys (tidied up & simplified)
- Added #16 Extended HotKeys, `⌃⌘K`
is rendered as
20221027 @mrwatson-de v0.43
- Improved Menus and HotKeys (tidied up & simplified)
- Added #16 Extended HotKeys,
⌃⌘K
Note: This style of documentation is particularly useful when working with GitHub, and may have limited traction for yourself in other situations.
It's not that difficult.
Basically,
- an fmAutoMate function is just the guts of a let statement (without the Let and the result bit)
- you can use MBS functions to do almost anthing you want
- there's a bunch of code blocks you can use that expand to
- you can store blocks of text or stuff in parameters and then reference them from within the code (saves hours of escaping text!)
The best way to learn is by looking at the existing functions.