3 Replies Latest reply on Jan 7, 2016 2:06 PM by electon

    mac rewriting script text and adding gibberish

    dinoeverett

      I recently worked out a script to click a button and go directly to individual pdf's on a server. It works perfectly on a pc but when the script triggers on the mac it converts the link text into the following:

       

      http://y:%5CArchives%5CUSC%20Desktop%5CNOTEBOOKS%5C74_480_80_HELEN_CHANDLER_NEVER_ROBBED_A_BANK.pdf

       

      and tries to open it in Safari instead of Adobe Acrobat

       

      the link should be

      y:/Archives/USCDesktop/NOTEBOOKS/74_480_80_HEL:EN_CHANDLER_NEVER_ROBBED_A_BANK.pdf

       

      Is there a fix for this?

        • 1. Re: mac rewriting script text and adding gibberish
          electon

          The link gets url encoded obviously and if it does not work that's what you seen in the address bar.

          On Windows it will open the file with default application depending on system preferences.

          On Mac you can use file:// instead of http://

          1) Does not work in WebDirect.

          2) Safari will actually try to render contents of the file in the browser.

           

          file:///volumes/y/Archives/USCDesktop/NOTEBOOKS/74_480_80_HEL:EN_CHANDLER_NEVER_ROBBED_A_BANK.pdf

           

          If it's a network share you're accessing, you need to figure out if this will work.

          I think the share would need to be mounted first.

           

          Where does the path come from? maybe it would be easier to store only reference to the file in filemaker.

          In order to access it across the network, the shares would need to be mounted / connected to on both computers.

           

          Open URL

          • 2. Re: mac rewriting script text and adding gibberish
            dinoeverett

            The defaults on the mac specify all pdf's be opened by Acrobat, and the weird thing is the script text does not actually list "http://"

             

            It only lists

            y:/Archives/USCDesktop/NOTEBOOKS/74_480_80_HEL:EN_CHANDLER_NEVER_ROBBED_A_BANK.pdf

            • 3. Re: mac rewriting script text and adding gibberish
              electon

              dinoeverett wrote:

               

              The defaults on the mac specify all pdf's be opened by Acrobat, and the weird thing is the script text does not actually list "http://"

               

              Not sure I understand. According to the manual file:// protocol should work on both Mac and Win.

              You probably mean that you only pass the path without the protocol specifier and the browser on windows prepends http:// by itself.

              If you prepend your path with file:///driveLetter/folder/filename it should work as long as your share is mounted, possibly the OS will try and mount it first.

              Beware that connecting from OSX you might not use drive names only and it needs to be prepended with /volumes/.

              So you need to sniff out the Platform you're running it from and construct different variables.

               

              Have a couple of tests run because it might depend on the setup and network environment.