7 Replies Latest reply on Sep 26, 2009 1:25 AM by try67

    Opening External Programs

    fictus

      Is there a way to open an external program from adobe javascript? For example. I want to invoke my external program located in:

       

      c:/Program Files/SignaXure/SignaXure.exe

       

      How can I write a script so that when I press a button the program above opens (separetely and independently). I am not experienced with javascript but I know in visual basic I could use a Shell(ProgramPath) command to do the trick.

       

       

      Thank you in advance...

        • 1. Re: Opening External Programs
          try67 MVP & Adobe Community Professional

          Security restrictions in Acrobat don't allow this.

          • 2. Re: Opening External Programs
            fictus Level 1

            Thank you for your reply. It's amazing that Acrobat is so powerful but yet it's become so weak...

            • 3. Re: Opening External Programs
              try67 MVP & Adobe Community Professional

              Has it ever been able to do that? I doubt it.

              • 4. Re: Opening External Programs
                fictus Level 1

                I'm not really sure but I know that prior to Acrobat version 6 you were able to program buttons that could copy/cut/paste and a bunch of other sutff which is no longer present the latter versions. So maybe it was possible back then but I'm not sure.

                • 5. Re: Opening External Programs
                  try67 MVP & Adobe Community Professional

                  You're right that the security restrictions are much stricter. For some of

                  them I understand the reasoning behind it, for example I wouldn't want an

                  Acroabt script to be able to launch an application on my machine, but stuff

                  like preventing pasting is a bit silly.

                  • 6. Re: Opening External Programs
                    fictus Level 1

                    I thank you for your support. I am a windows mobile programmer and I programmed an application that allows you to use your PDA as a signature pad and then import the signature into your Windows PC. I realized that if I have a copied image in the clipboard and can easily paste it into any PDF file within Acrobat and my program does exactly that; it imports the image into the PC and then it loads it into the clipboard. The problem was that acrobat doesn't support a menu option for "Paste", so I googled around to see if I could use javascript to simulate sendkey for ctrl + v to paste but I had no luck. In the end I tought it would be easier if I reprogrammed my program to run in the background and just use a script within Acrobat to launch my application, then my app would initiate the signature capture process and automatically paste the image into Acrobat. But it seems everything I try ends up in a dead end, and in part it's due to the imposed limitations of Acrobat.

                     

                    I hope you understand where my frustration comes from - but don't get me wrong; I love Acrobat. Any ideas of how I could acomplish what I need? Maybe there might be other methods in Acrobat that I'm not aware of. Please share any ideas you might have...

                    • 7. Re: Opening External Programs
                      try67 MVP & Adobe Community Professional

                      If the only thing you wanted to do was paste the signature in Acrobat, then

                      you don't need JavaScript.

                      You can write a Visual Basic application to do that, or even something using

                      automation software.

                      By the way, VB can also launch a JS in Acrobat.