2 Replies Latest reply on Sep 7, 2011 4:41 PM by mgores

    closing a file after saving a copy

    mgores

      Title

      closing a file after saving a copy

      Post

      I am working on a solution where I have a template file.  I have a script that runs on open that checks if it is the template.  If it is, the user is asked to input the filename and it saves itself as a copy with that filename and opens the new file.  That part works until I put a "close current file (template)" step at the end.  If I have that step the new file does not open and the script hangs.  Is there a way around this?

        • 1. Re: closing a file after saving a copy
          philmodjunk

          Not sure why it would "hang", but add a select window before the close current file to res-select the template file or the script will close the file you just opened instead of the template.

          • 2. Re: closing a file after saving a copy
            mgores

            Ok it is working now and is pretty snappy, hard to tell it is switching from one file to the other.  Now I just have to figure out how to set the path as a variable, I have done it before with saving contents of a container file to a path set by a variable, but saving the copy of the filemaker file keeps giving me the "cannot create the file on this volume" error.  Will have to dig through my other solutions and see what I am doing wrong.