3 Replies Latest reply on Jun 28, 2010 1:55 AM by sunmoonstar.13

    Open URL using relative filepath

    sunmoonstar.13

      Title

      Open URL using relative filepath

      Post

      Hi there,

       

      On my home laptop, I have a folder called "_Databases" which contains several Filemaker files, two of which I'll refer to as RED.fp7 and WHITE.fp7.

       

      I'm trying to write a script within RED.fp7 that will open WHITE.fp7 using the "Open URL" script step and a relative file path.

       

      I've tried...

       

      Open URL [No dialog: "file:WHITE.fp7"]

       

       

      and...

       

      Open URL [No dialog: "file:_Databases/WHITE.fp7"]

       

       

      and I've also tried...

       

      Open URL [No dialog: "filewin:../WHITE.fp7"]

       


      ...but when I run any of these scripts, nothing happens.

       

      It needs to be a relative file path because the folder and its files exist on another computer (at work) and the script needs to work on both machines.

       

      Note also that WHITE.fp7 is NOT set up as an External Data Source within RED.fp7 because the two files are unrelated to each other. Essentially, the script is intended to function as a shortcut to open WHITE.fp7 from within RED.fp7.

       

      I'm running FMP 11 Advanced on Windows 7.

       

      Any help with this issue would be much appreciated, thanks.

       

       

      Nick

       

        • 1. Re: Open URL using relative filepath
          comment_1

          Use the Open File[] script step to open a Filemaker file, not Open URL[].

          • 2. Re: Open URL using relative filepath
            Steve Wright

            Quote :

             

            Note also that WHITE.fp7 is NOT set up as an External Data Source within RED.fp7 because the two files are unrelated to each other. Essentially, the script is intended to function as a shortcut to open WHITE.fp7 from within RED.fp7.

            ---------------------

             

            Whilst I do agree completely with comment, open file[] should really be used

            I have used the following approach in the past..although only on windows machines

             

            Send Event []

            Open Document / application

            File :  file:Utility/test-utility.fp7

             

            This of course has its drawbacks, lets say you installed FM11, but then wanted to also have FM10 installed which is feasible, so you install FM10 second (FM10 now becomes the default application for .fp7 files)

             

            So... your solution is open in FM11, you send the event and your file will open in FM10 not in FM11.

             

            Im sure there are more scenarios such as this, so the question is.. why not add it as a data source, even though its not going to be a source ?  The file will not be opened / requested if there is nothing depending on it (at least thats what I find) so it should not cause issues.

             

             

            Of course, I do use open URL to open FP7 files myself, however this is part of a launcher file I use for opening hosted databases, in which case the url format is : 

             

            Open URL [No dialog ; "FMP7://192.168.1.5/solution"

             

            Obviously, with the relevant IP address and file name (.fp7 not required)

             

             

            • 3. Re: Open URL using relative filepath
              sunmoonstar.13

              Thanks, Comment and SWS, for your suggestions. I'll do some testing and see how it goes :-)

               

              Nick