Jump to content
Sign in to follow this  

Replicating FM's " New From Template" Behavior

Recommended Posts

I am trying to script the same experience as FM's "Create a new file using a template" behavior. Specifically, this allows you to select a .fp7 file and forces the user to "Create a copy named", then automatically opens this user's copy without altering the original .fp7 file.

When attempting to replicate this behavior in scripts, I am only able to use a "Save a copy as" script step which is not as elegant as the former. It does not automaticly open the user's copy without asking them to check the box- and on top of that, I get into some scripting trouble to boot.

So far, the best I have been able to come up with is something like this (where my solution is named "db Template");)

If [Get (FileName) = "db Template"]

.. Save a Copy as [copy]

.. Close File [Current File]

End If

Perform Script ["Startup (not Template)"]

Of course, this doesn't open the file properly even if the user selects "Automaticaly open this file" during Save As...

Any ideas on a more elegant approach? I do not want my solution placed in the FM template folder if possible as I am trying to create a more stand-alone experience.

Thank you so much!

Share this post

Link to post
Share on other sites

A more elegant approach, I think, would be to have your solution accommodate all needs within the existing file/s structure, instead of requiring new files to be created periodically. Creating files should be left to the developer, and possibly to a sophisticated user (one that wouldn't need your hand-holding script).

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.