Not that I know. But I use Clip Manager to store script snippets that I can just paste into any new blank script.
Well, if this is not possible I wil stick to my actual habbit - I have my "template database" and in there a "template basic script". In a project I use this basic script and duplicate it every time I create a new script...
That's pretty much what I do- I have a template FileMaker file that includes a table with some basic fields (created timestamp, created by, modified timestamp, modified by, unique ID), a bunch of utility scripts that I've used over the years, and a few custom functions that I tend to find helpful. Doing this saves a little time when creating a new solution versus starting completely from scratch.
I find my "template" file has things added to it over time, as I create or discover new custom functions that I find useful, or new scripts, etc.
Ever since we now have the abliity to copy these kinds of things (and paste elsewhere), I also create template(s) of oft-used fields, and scripts. Then just copy/paste.
I Think the "standard" term is wrong... and think this feature is supposed to facilitate script writing for beginners; scenario :
With the standard tools of FMP, I go to employee layout, perform a find and then, do a sort on one or more field. And Ok i Print the result.
If i appreciate the result and want to repeat this action later, so…
I execute the "new standard script" command and, magic, the three previous action are automatically added on my new script. But the last action, Print Command, was not added !!!
It is a bit poor. To be really cool, there must be a "record command" to do that more completely and efficiently...
Sounds like an very old feature that was never updated...
Know that doesn't help but just my opinion...
Yes, I use pretty much of the suggestions you can find on Overview - Coding Standards - FileMaker Coding Standards. Here you find hints for a starter table and also a starter script. It also shows how to start up a multi-language approach. But it lacks some suggestions for starter scripts or custom functions.
Yes, it really looks like an old, forgotten "standard" for a script. As commenting a solution is important, a standard script should at least contain a basic commenting suggestion in the header.
Unfortunately Filemaker do deliver at some points "examples" that are jumping a bit too short. For example does not anyone of the starter solutions consider "transaction-safe" programming.
Well, anyway - I will continue to copy'n'paste my "standard script"...
Luna.media a écrit:
Yes, it really looks like an old, forgotten "standard" for a script. As commenting a solution is important, [… ]Unfortunately Filemaker do deliver at some points "examples" that are jumping a bit too short. For example does not anyone of the starter solutions consider "transaction-safe" programming.[…]
One more time, don't think that is the purpose. Newer starter solution on 12 and 13 are really better than previous version and if you check in details, you will find good ideas on it. But they are more designed for beginners than for experienced developers who have their own starter solution for long time ago.
But we are going away your topic… Jut one one more question… when you say :
Luna.media a écrit:
[…]Well, anyway - I will continue to copy'n'paste my "standard script"…[…]
You are talking about duplicate button (CTRL-D or cmd-D) on the right bottom of script manager isn't it ?
I am asking because you can also open a standard script, copy all actions, create a new script and paste the previous actions into it, that is much more time indeed.
I use the duplicate button to dulicate my personal standard script and then edit the copy. But as I have to bring my standard into each new project manually (not such a big deal, I know) I wanted to replace ithe "standard script" itself that can be chosen if I hit the "new" (picture: "Neu") button. The marked one is the "standard script" (picture: Standardscript...")
Yes, the newer solutions are certainly better than the older ones. I have never uses one of these small, nice-looking example solutions because at the end the they just cover a small problem and ist seems easier to start from scratch in my own model and schemes.
Therefore I use them sometimes as a "design example" and more often to learn some techniqu that was used in it. But - for this case I miss examples for "right" developing e.g. transactions, mutli-user-enviroments or controlling user-acces etc.
If Filemaker would present some basic standard approaches for a set of broadly requested use-cases, it would be more helpful to all new Filemaker developers.
In my view these "helpful example solutions" would minimize the ever again questions that occur in the forums (and that I often have).
Luna.media a écrit:
[…] But as I have to bring my standard into each new project manually (not such a big deal, I know) I wanted to replace ithe "standard script" itself that can be chosen if I hit the "new" (picture: "Neu") button.[…]
OK but i think that even if future release allow you do that , it will be, as usual, "file by file". So the need to bring it on all solutions will not change…
As i understand, you want the ability to set up a "header" of script as a General Preference, (that mean, i think, by user). As you know, there is very few things you can do when you go to FileMaker Pro > Preferences. The large majority of settings are stored on the database file.
Anyways, i encourage you to post your suggestion here :
Good Luck Luna.media !
Maybe our are right - if I could re-define the standard script only for a certain file than it is nearly the same if I copy "my" default script or use the "standard script"-button. In this case - the button really looks like a relict.
btw: I do not want to set any rare General Preference but a "script header" like:
- # Purpose: #
- # Returns: #
- # Parameters: #
- # Called from: #
- # Author: #
- # Notes: #
- # History:
# Standard: [Aus] - Benutzer sollte Script NICHT unterbrechen können, um keine unvorhergesehenen Ergebisse zu erlangen Wenn [ $$HabD_System_Developer = "Developer" ]
AnwenderAbbruchZulassen setzen [ Ein ] Sonst
AnwenderAbbruchZulassen setzen [ Aus ] Ende (wenn)
# Standard: [Aus] - Filemaker-Fehler werden ausgegeben. Wenn [Ein], dann muss eine eigene Fehlerroutine existieren "Wenn (Hole (LetzteFehlerNr) ) ..."
Fehleraufzeichnung setzen [ Aus ]
# Standard: Layout bewusst setzen (oder eben nicht setzen), um sich deutlich zu werden, wo das Script funktionieren soll Gehe zu Layout [ Originallayout ]
// Aktuelles Script verlassen [ Ergebnis: Hole ( ScriptName ) ]