8 Replies Latest reply on Mar 26, 2008 6:29 AM by (Jerry_Jugovich)

    webaccesslib ?

    ronnqv1st16
      I´ve tried following example snippet:

      if( webaccesslib == undefined ) {
      if( Folder.fs == "Windows" ) {
      var pathToLib = Folder.startup.fsName + "/webaccesslib.dll";
      } else {
      var pathToLib = "/Applications/Adobe%20Bridge%20CS3/Bridge%20CS3.app/Contents/MacOS/webaccesslib.bundle";
      // verify that the path is valid
      }
      var libfile = new File( pathToLib );
      var webaccesslib = new ExternalObject("lib:" + pathToLib );
      }

      If Bridge CS3 is target it seems to end OK. If InDesign, it ends up to "FIle or folder does not exist". Can't I use HTTP connection from Indesign script?

      - nils
        • 1. Re: webaccesslib ?
          Level 1
          Nils Forsblom wrote:
          >
          > If Bridge CS3 is target it seems to end OK. If InDesign, it ends up to "FIle or folder does not exist". Can't I use HTTP connection from Indesign script?

          As far as I understand both the webaccess and xmp libs will only work in Bridge
          (and, I think, ESTK2). This is something I'm not particularly pleased with,
          especially the xmp lib.

          -X
          --
          for photoshop scripting solutions of all sorts
          contact: xbytor@gmail.com
          • 2. Re: webaccesslib ?
            ronnqv1st16 Level 1
            Sorry - It seems that the path must be typed with spaces.
            /Applications/Adobe Bridge CS3/Bridge CS3.app/Contents/MacOS/webaccesslib.bundle";

            However when the var pathToLib is correct the message is "I/O error" when script target is InDesign.

            -nils
            • 3. Re: webaccesslib ?
              Adobe has provided a library to support FTP and HTTP protocols. Unfortunately this library was not designed to allow accessing this library from InDesign or for that matter any other app in the Creative Suite other than the Bridge.

              Looking into this a little closer on the Windows platform it is possible to copy three DLLs to a common location and then use the Web Access Library from a script targeting InDesign.

              The three DLLs are delivered from Adobe in the following location C:\Program Files\Adobe\Adobe Bridge CS3 and are

              * webaccesslib.dll
              * coretypes.dll
              * netio.dll

              Using Dependency Walker the following files must also be installed these are installed by Adobe when InDesign CS3 and are in the Bridge CS3 folder also. Since Windows registers These as shared DLLs they do not need to be copied. DLLs referenced by webaccesslib.dll installed by Adobe

              * coretypes.dll
              * netio.dll
              * bib.dll
              * extendscript.dll
              * sccore.dll

              On the Mac this file is in a bundle named webaccesslib.bundle
              I found a way to Use this bundle from InDesign. It requires copying the webaccesslib.bundle file and creating symbolic links. No way is this supported by Adobe

              Script to copy bridge bundle and create symbolic links
              to get WebAccessLib to work in Indesign on Mac

              #!/bin/sh
              cd "/Applications/Adobe InDesign CS3/Adobe InDesign CS3.app/Contents/MacOS"
              cp -R "/Applications/Adobe Bridge CS3/Bridge CS3.app/Contents/MacOS/webaccesslib.bundle" .

              ln -s webaccesslib.bundle/AdobeLibraries/libcurl.3.0.0.dylib libcurl.3.0.0.dylib
              ln -s webaccesslib.bundle/AdobeLibraries/libSSL.dylib libSSL.dylib
              ln -s webaccesslib.bundle/AdobeLibraries/libCrypto.dylib libCrypto.dylib
              ln -s webaccesslib.bundle/AdobeLibraries/libCoreTypes.dylib libCoreTypes.dylib
              ln -s webaccesslib.bundle/AdobeLibraries/libChar16.dylib libChar16.dylib

              cd "/Applications/Adobe InDesign CS3/Adobe InDesign CS3.app/Contents/Frameworks"
              ln -s ../MacOS/webaccesslib.bundle/AdobeLibraries/NetIO.framework NetIO.framework
              • 4. Re: webaccesslib ?
                Level 1
                Jerry_Jugovich@adobeforums.com wrote:
                > The three DLLs are delivered from Adobe in the following location C:\Program Files\Adobe\Adobe Bridge CS3 and are
                >
                > * webaccesslib.dll
                > * coretypes.dll
                > * netio.dll

                So all we need to do is execute a "new ExternalObject()" bit of code for each of
                these and then we're good to go? I worked around this by having PS call Bridge
                to do the actual FTP requests. It was a nasty bit of integration that I would
                love to dispose of.

                I also wonder if here is a similar stunt that can be used to get access to the
                AdobeXMPScript library. If that's true, then there is a lot of code of mine that
                is going to run a lot faster in the near future.

                -X
                • 5. Re: webaccesslib ?
                  Level 1
                  You have to do nothing execept put the three Dlls in the same folder.
                  I actually put them in the folder I am running my scripts from as you can see below. The hard part was for the Mac In the pathtoLib location put the three Dlls thats it

                  Never had to use the other library so I do not know worth a try

                  Here is my code
                  if( webaccesslib == undefined ) {
                  if( Folder.fs == "Windows" ) {
                  var pathToLib = Folder.startup.fsName + "/Plug-Ins/XXX/YYY/webaccesslib.dll";
                  }
                  else {
                  var pathToLib = Folder.startup.fsName + "/webaccesslib.bundle";
                  }
                  var libfile = File( pathToLib );
                  if ( ! libfile.exists ) {
                  alert("Fatal Error Accessing Webaccesslib " + pathToLib );
                  return false;
                  }
                  try {
                  var webaccesslib = new ExternalObject("lib:" + pathToLib );
                  }
                  catch (Error) {
                  alert("Fatal Error Creating Webaccesslib " + pathToLib );
                  return false
                  }
                  }
                  • 6. Re: webaccesslib ?
                    Level 1
                    Jerry_Jugovich@adobeforums.com wrote:
                    > You have to do nothing execept put the three Dlls in the same folder.
                    > I actually put them in the folder I am running my scripts from as you can see below. The hard part was for the Mac In the pathtoLib location put the three Dlls thats it

                    I wish somebody at Adobe had told me after I asked :)

                    Thanks much.

                    >
                    > Never had to use the other library so I do not know worth a try

                    I'll take a crack at it with the XMPScript libs sometime soon and report back.

                    -X
                    • 7. Re: webaccesslib ?
                      Level 1
                      meeee tooooo

                      Bob
                      • 8. Re: webaccesslib ?
                        Level 1
                        Ya I asked Adobe what could be done to get this to work also no help from them.

                        Info on Dependencies of AdobeXMPScript.dll
                        AdobeXMPScript.dll references the following XMP dlls
                        AdobeXMP.dll
                        AdobeXMPFiles.dll
                        AdobeXMPScript.dll

                        ** ExtendScript.dll
                        ** ScCore.dll

                        So it looks to me if you copy the XMP dlls to a common location you may get it to work. Past experience says no need to copy the files marked with astrix

                        Good Luck