|
|
|
|
Changing font attributes "en masse" on FileMaker Pro layouts (Win) FileMaker Pro (FMP) has no built-in feature that allows changing the font characteristics of one or several fields with a script, e.g. all fields from size 10 to size 12. By using a 2-line script and the Windows macro recording software AutoIt available at http://www.hiddensoft.com/AutoIt this goal can be achieved easily. Below is the source code of an example where the new font size is taken from a number field and where subsequently all fields on that page are changed. You can easily change the script according to the keyboard shortcuts available in FMP. Case seems to be important in the macro source text file, to be saved as "fontchge.aut" (any name will do, with the extension *.aut). So please use lowercase in the shortcuts. "^" = "Control", "+" = "Shift" and "!" = "Alt". Comment is in [...]: Send, ^l [layout mode]
Sleep, 100 [pause 100 milliseconds]
WinClose, Size [closes a possibly open Size window; otherwise menu items are dead]
Sleep, 100
Send, ^a [select all]
Sleep, 100
Send, ^+h [unlock all items]
Sleep, 100
Send, !t ["Format" menu item]
Sleep, 100
Send, s [Size]
Sleep, 100
Send, c [Custom]
Sleep, 100
Send, ^v {ENTER} [paste the copied font size, see FMP script below]
Sleep, 100
Send, ^h [lock all objects]
Sleep, 100
Send, ^b [back to browse mode]
After compilation with AutoIt you get "fontchge.exe".
The FMP script assumes a number field "n_fontsize" where you enter the desired size before running the script: Copy [Select, "n_fontsize"] Send Message ["fontchge.exe", "aevt", "odoc"]You can modify this setup to do any other action in layout mode where scripting is normally not available. It's all up to your fantasy! Good luck! Back to the list of my FileMaker Pro trouvailles |
![]() |
![]() |
|