13 Replies Latest reply on Jan 16, 2015 6:01 AM by disabled_Luna.media

    Can I re-define the content of "standard scripts"?

      Hi to all,

       

      if I write a new script I can select "standard script" to start this. In this there are thre lines predefined. As I have an own "script template" with much more basic things like a commentary header etc. I wonder if I can make my template script to the "standard script" or if I can modify the "standard script"?

       

      Any ideas?

      Luna

        • 1. Re: Can I re-define the content of "standard scripts"?
          wimdecorte

          Not that I know.  But I use Clip Manager to store script snippets that I can just paste into any new blank script.

          • 2. Re: Can I re-define the content of "standard scripts"?

            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...

            • 3. Re: Can I re-define the content of "standard scripts"?
              ByteTheBullet

              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.

              • 4. Re: Can I re-define the content of "standard scripts"?
                beverly

                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.

                 

                Beverly

                • 5. Re: Can I re-define the content of "standard scripts"?
                  Fred(CH)

                  Hi,

                   

                  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...

                   

                  Fred

                  • 6. Re: Can I re-define the content of "standard scripts"?

                    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.

                    • 7. Re: Can I re-define the content of "standard scripts"?

                      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"...

                      • 8. Re: Can I re-define the content of "standard scripts"?
                        Fred(CH)

                        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.

                         

                        Fred

                        • 9. Re: Can I re-define the content of "standard scripts"?
                          Fred(CH)

                          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.

                           

                          MyNewStandardScript.png

                          • 10. Re: Can I re-define the content of "standard scripts"?

                            Dear Fred,

                             

                            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...")

                             

                            Bildschirmfoto 2015-01-16 um 12.16.37.png

                            • 11. Re: Can I re-define the content of "standard scripts"?

                              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).

                               

                              My opinion...

                              • 12. Re: Can I re-define the content of "standard scripts"?
                                Fred(CH)

                                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 :

                                http://www.filemaker.com/company/contact/feature_request.html

                                 

                                Good Luck Luna.media !

                                Fred

                                • 13. Re: Can I re-define the content of "standard scripts"?

                                  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 ) ]