2 Replies Latest reply on Apr 7, 2010 5:37 AM by Belton

    Checking for presence of a plugin on opening file

    Belton

      Title

      Checking for presence of a plugin on opening file

      Post

      I'm at a loss how to do this.

      How do I check that a particular plugin is present when a user opens a file?

      I've tried to make a step in a script that will create an error so I can use an if step to deal with it. However even when the plugin isn't installed I can't generate any errors, even though the calculations that depend on the plugin don't evaluate properly and show <function missing> in any calculations.

      I'm expecting an error 113 but all I get is 0

       

      The plugin in question is Regex Plugin

      I'm using FileMaker Pro 10 Advanced. Mac OS 10.5.7

       

      Any help or pointers would be appreciated.

       

        • 1. Re: Checking for presence of a plugin on opening file
          hbrendel

          The plug-in vendor should explain this in the accompanying documentation.

           

          In the plug-ins I use (I don't use Regex) it's done with the Version() function. If not present the result is "?". Which you can test.

           

          An example:

           

          If [Left ( SDialog_Version ( "long" ) ; 24 ) ≠ "24U SimpleDialog Plug-In"]

              Show Custom Dialog ["Error"; "The 24USimpleDialog Plug-in could not be found.¶¶Install this plug-in and try again"]

              Close File [Current File]

          End If

          • 2. Re: Checking for presence of a plugin on opening file
            Belton

            Thank you for your quick reply. That does the trick.

             

            Well you get what you pay for and regex is free and the documentation a bit sparse!

            But it does what I need in a relatively simple manner.

             

            I got hung up on error codes and didn't think about being able to check getVersion not matching.