Cool Tools for FileMaker - Coding Faster with Typinator
Be sure to use the link below if you're interested in purchasing! There may be unexpired discount codes available.
Being more productive when developing in FileMaker is something that will always pay off. You’ll create solutions faster and feel better about how quickly you can solve problems.
Due to the unique environment in which we write code, there are concepts other developers have access to that we don’t. We’re not using a standard text editor with modules and plug-ins to extend its functionality. In FileMaker, we rely on a few third-party plug-ins and tools to enhance the development experience.
In this video, I’ve invited Robert Naud and Josh Halpern to demonstrate Typinator from Ergonis Software. It’s a powerful tool that can handle all sorts of tasks involving the OS clipboard and FileMaker. Since FileMaker uses a dedicated clipboard format, which is primarily XML, you need to translate that XML into the normal text you work with. Typinator makes this possible. You can automatically inject script steps, layout objects, custom functions, and almost anything transferable via the clipboard. By combining AppleScript and/or JavaScript with a few command line tools, you can work in FileMaker with auto-expansions that make your job much easier!
Comments
Windows Alternatives
Thank you for this very helpful video, Matt. Thank you also for providing some Windows alternatives, if you will.
Windows tools
If you visit this page and scroll down to the Windows section you'll find the link to Dan Smith's powershell scripts for clipboard manipulation. I'm not familiar with them, but maybe I can get Dan on video to show how they work.
You'll also find other tools and I think AutoHotkey is what Dan uses - according to Josh.
-- Matt Petrowsky - ISO FileMaker Magazine Editor
Thank you!
I appreciate your very quick response. Thank you.
Thank you
Hi Matt,
A so great video !
Can you share few snippets from Typinator ?
Kind regards
Antoine
Follow up videos to come
I will be creating some more videos about using Typinator to improve your FileMaker workflows.
-- Matt Petrowsky - ISO FileMaker Magazine Editor
Typinator
Thanks for this fantastic video!
I purchased Typinator and have been trying it out. However, I'm encountering an issue...
I can get it to work with very simple script steps, but it fails when handling more complex scripts. I can't seem to pinpoint the problem.
I copied Josh's Typinator FileMaker private routine exactly, including the clipboard setting to (do shell script "pbpaste" as «class XMSS»), but for some reason, it doesn’t work with this one. It looks like it’s pasting, but nothing actually shows up in the FileMaker script.
Any idea what might be causing this?
In Typinator i have this:
{/AppleScript
set clip to "<fmxmlsnippet type=\"FMObjectList\">
<Step enable=\"True\" id=\"89\" name=\"# (comment)\">
<Text>hay un HaltScript dans Alert</Text>
</Step>
<Step enable=\"True\" id=\"1\" name=\"Perform Script\">
<Calculation><![CDATA[Let([~id= 7;
~field= $$LNG&\"alertitol\"; ~field1= $$LNG&\"alert\"; ~field2= $$LNG&\"subalert\";
~titol = ExecuteSQL(\"SELECT \"& Quote(~field) &\" FROM ALERT WHERE iD = ?\";\"\";\"\";~id);
~alert = ExecuteSQL(\"SELECT \"& Quote(~field1) &\" FROM ALERT WHERE iD = ?\";\"\";\"\";~id);
~sub = ExecuteSQL(\"SELECT \"& Quote(~field2) &\" FROM ALERT WHERE iD = ?\";\"\";\"\";~id);
~color = ExecuteSQL(\"SELECT color FROM ALERT WHERE iD = ?\";\"\";\"\";~id);
~bckg = ExecuteSQL(\"SELECT background FROM ALERT WHERE iD = ?\";\"\";\"\";~id);
~audio = ExecuteSQL(\"SELECT audioNum FROM ALERT WHERE iD = ?\";\"\";\"\";~id);
~icon = ExecuteSQL(\"SELECT iconum FROM ALERT WHERE iD = ?\";\"\";\"\";~id);
~perm = ExecuteSQL(\"SELECT opsi_permanent FROM ALERT WHERE iD = ?\";\"\";\"\";~id);
~message = TextStyleAdd(Upper(~titol) &If(not Contains(~titol;\"!¶?\");\":\");Bold) &\"¶\"& ~alert;
$$UI.MESSAGE = TextSize(~message;14) &\"¶¶\"& TextSize(TextStyleAdd(~sub;Italic);14)
];
JSONSetElement ( \"{}\" ;
[ \"action\" ; \"show\" ; JSONString ];
[ \"object\" ; \"popover.status\" ; JSONString ];
[ \"pane\" ; \"slider.status\" ; JSONString ];
[ \"duration\" ; If(~perm=\"si\";0;1) ; JSONNumber ]; // 0 reste en place
[ \"progress\" ; 0 ; JSONBoolean ];
[ \"close\" ; If(~perm=\"si\";1;0) ; JSONBoolean ]; // apparait la X
[ \"icon\" ; ~icon ; JSONNumber ];
//[ \"color\" ; ~color ; JSONString ];
[ \"background\" ; ~bckg ; JSONString ];
[ \"gradient\" ; 1 ; JSONBoolean ];
[ \"shadow\" ; 1 ; JSONBoolean ];
[ \"audio\" ; GetFieldName( ALERT::AUDIOFILES[~audio] ) ; JSONString ];
[ \"message\" ; \"$$UI.MESSAGE\" ; JSONString ]
)
)]]></Calculation>
<Script id=\"279\" name=\"Status Message Toggle\"></Script>
</Step>
</fmxmlsnippet>"
-- set the clipboard to clip
set the clipboard to {text:(clip as string)}
-- convert clipboard XML to Filemaker object
{"_fm_XMLtoStep"}
}{esc}{up}{paste}
Since this might be useful for others as well, maybe another video could be the solution! 😊
Thanks
_patryck aguilar
Multireflex
Calling abbreviations
One of your primary issues is calling an abbreviation within your AppleScript code.
-- convert clipboard XML to Filemaker object
{"_fm_XMLtoStep"}
That particular step is calling a Typinator abbreviation inside of your AppleScript code. This will need to be revised. Also note that Typinator will expand any literal return. In order to add returns within your abbreviations for the sake a readability you need to use option-return, which will show as a "return arrow". These do not expand out.
-- Matt Petrowsky - ISO FileMaker Magazine Editor
Typinator ¶¶ › char(13)
Thank you so much! I replaced my ¶ with char(13), and now everything works perfectly. Also, {"_fm_XMLtoStep"} refers to Josh’s little rule in Typinator:
`set the clipboard to (do shell script "pbpaste" as «class XMSS»)`
I’m really enjoying making these improvements to boost efficiency!
Thanks!
Multireflex