Jump to content

Just to give everyone an idea of the power of FM scripts . . . .

This topic is 2918 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Here's the one I just finished up.  For my legal practice, we routinely have to generate special PDF forms for submission to the patent office that list a lot of patents and related information regarding each.


I wrote a script that:

(1) takes the list from a field, and parses it to remove extraneous characters;

(2) check whether each patent is indeed valid by querying Google;

(3) for each valid patent, download related information from Google;

(4) parsing the related information downloaded and generating an XML file;

(5) causing Adobe Acrobat to import the XML file into the form.


I had assist from some Troi plug-ins, primarily File, Dialog, and URL, and to a lesser extent Text.  URL is used to query Google.  File is used to create the XML.  Dialog is used to present progress dialogs to the user, and to at the end give the user the option to open the created PDF form in Adobe, show it in Finder, etc.


The script also relies to some extent on AppleScript.  One caveat -- I did have to hire a guy on elance to add a custom menu item in Acrobat so I could automatically import the XML into the PDF, which is terrible in the functionality it reveals to AppleScript. 


In any case, if anyone is interested, I've attached a copy of the script to this post.  I'm guessing that there are quite a few inefficiencies in how I do things -- I'm still quite novice -- and you may notice that I rely on AppleScript in some places where Troi File could have been used (simply because I had the AppleScripts already written). 


In a similar script, I download all the PDF files for the patents in lieu of generating the form.   You can use the URL plug-in to download the PDF into a text variable, and then use File to save it with the extension ".pdf" such that it "becomes" a PDF.



Generate IDS script.pdf

Link to comment
Share on other sites

I think you are demonstrating the power of plugins and AppleScript more than the power of Filemaker itself...


Just to balance the picture, Filemaker can export any type of XML file, using the Xalan XSLT processor included in the application. If you wanted, you could have each exported item checked against some external URL during the export itself. For example, you could export a list of amounts and currencies and have the exporting process get the current rates and convert the amounts (although I wouldn't recommend doing this if the process is not closely supervised. in case the connection fails).

Link to comment
Share on other sites

This topic is 2918 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.