4 Replies Latest reply on Mar 6, 2013 4:34 PM by stratlake

    Send Event - Parameters

    stratlake

      Hi Guys,

       

      I'm having some trouble with this script.

       

      HTMLTools is a command line program which converts .wmf to PDF.

       

      My Code is:

       

      Set Variable ($command: "cmd /c "C:htmltools htmltools siteplan.wmf siteplan.pdf)

      Send Event ["aevt";"odoc"; $command]

       

      I DO have siteplan.wmf in c:htmltool folder.

       

      I can get htmltools to work when running it through cmd, however using this method (without the /c), it seems to get to the path but not parse any parameters.

       

      Maybe I'm just not conforming to Filemakers correct amount/direction of slashes or my variable does not contain a fibonacci number of quotation marks

        • 1. Re: Send Event - Parameters
          LyndsayHowarth

               >> Set Variable ($command: "cmd /c "C:\htmltools htmltools siteplan.wmf siteplan.pdf)

           

           

          You don't seem to have closed the quotes... or not separated the literal values or something...

           

          What does the command string look like without being embedded in a calculation?

           

          - Lyndsay

          • 2. Re: Send Event - Parameters
            wimdecorte

            stratlake wrote:

             

            HTMLTools is a command line program which converts .wmf to PDF.

             

            My Code is:

             

            Set Variable ($command: "cmd /c "C:\htmltools htmltools siteplan.wmf siteplan.pdf)

            Send Event ["aevt";"odoc"; $command]

             

            I DO have siteplan.wmf in c:\htmltool folder.

             

             

            if htmltool is a folder then the code would look like below, provided that the htmltools is an executable and that it is located in the root of the C drive

             

            cmd /c c:\htmltools.exe c:\htmltool\siteplan.wmf siteplan.pdf

             

            since none of the paths or file names have a space in them, there is no need for quotes.  If that is nog guarantueed then you have to quote the different pieces.

            • 3. Re: Send Event - Parameters
              stratlake

              Hi Lyndsay

               

              The command string looks like:

               

              c:\htmltool\htmltools.exe c:\htmltools\123.wmf c:\htmltools\siteplan.pdf

              • 4. Re: Send Event - Parameters
                stratlake

                Ok, I just found out that because htmltools.exe wasn't running as Administrator, it would not work.

                 

                After I went to properties, Compatibility, "'Run As Administrator", it worked the first time.

                 

                What a waste of time