14 Replies Latest reply on Feb 11, 2012 9:58 PM by listen2earth

    Clipboard into variable

    alfred1963

      Hi all,

       

      Is there a way to get the clipboard content into a variable?

       

      I like to find a better way for going intbetween FM Files and not having to use the clipboard to step from one script to the next one in the file the first script opened.

       

      taking variables from one .fp7 file to another?

       

       

      Thanks for thinking that over…

        • 1. Re: Clipboard into variable
          davidwheelock

          Hi Alfred,

           

          Have you tried passing values between two files through script parameters?

           

          In other words File #1 execute scriptA,  then calls scriptB in file #2, with an optional script parameter. When scripB starts up, you use a Set Variable [ Get ( ScriptParameter ) ] script step.

           

          Hope this helps!

           

          Dave Wheelock

          • 2. Re: Clipboard into variable
            techt

            Why not just create a relationship between the two files?

             

            Tim

            • 3. Re: Clipboard into variable
              alfred1963

              Hey that fast,

               

              Thanks that seems to make sense I will do some test using that idea it would keep the clipboard out of it…

               

              I will test it…

              • 4. Re: Clipboard into variable
                alfred1963

                Works just fine thanks again…

                Get ( ScriptParameter ) soooo much power in that so easy to overlook.

                 

                 

                • 5. Re: Clipboard into variable
                  alfred1963

                  I have relationships established

                  A lot of time I prefer the scripting way of doing it as its esier to read the script and then make sense of it later.

                   

                  As usual there's more than one way…

                  • 6. Re: Clipboard into variable
                    alfred1963

                    Its easy to have way too many relationships that you end up having to maintain, if you are new to FIlemaker don't ignore Get ( ScriptParameter )

                    saves you lots never needed repeated scrips that you may have to create otherwise keeps it all manageable.

                    • 7. Re: Clipboard into variable
                      davidwheelock

                      Glad to hear it'll help.

                       

                      I'm with you, the cleaner the relationship, the better!

                       

                      Cheers!

                       

                      Dave W

                      • 8. Re: Clipboard into variable
                        listen2earth

                        Hummm wish i could see a sample of this not quite get the picture but sounds interesting.

                         

                        HEARTLAND AMERICA

                        ROB

                        • 9. Re: Clipboard into variable
                          alfred1963

                          Variables don't make it from one file to another however Get ( ScriptParameter )  gets passed from scrip A to B wen you call B from within A.

                           

                          B being the external script in the file that you move into

                           

                          Anyway it's better as it leaves the clipboard content out of it...

                           

                          Hope that helps. Alfred

                          • 10. Re: Clipboard into variable
                            listen2earth

                            Be nice if FM allowed you to literally set the contents of the clipboard into a variable

                            HEARTLAND

                            AMERICA

                            ROB

                            • 11. Re: Clipboard into variable
                              listen2earth

                              Good Day

                              Thank You

                              4YOURtime

                               

                              Geeeeeeeeese___ absolutely the most highlighted advance feature of FileMaker and Her Scripting capabilities and it's looked upon as a secretly concealed feature!!!!!!!!

                               

                               

                              i 'feel' many with FileMaker should start considering another look at Her Scripter capabilities, if that's the case, and within the Script Step called external script their should be the option of passing information to another script!! Geeeeeeeeese !!!

                               

                              Eliminating Relationships altogether is the Apex goal in the evolution of FileMaker!!!! It should all be done internally!!

                               

                                    

                              r o b  'jesus Land Tidd'  lewis

                                  architect visionary for

                                  software & hardware

                                  

                               

                                      disabled War

                                 Vet and Proud Of It

                               

                               

                              Structures from silence -- earths

                              dynamic airwave -- changes all

                              • 12. Re: Clipboard into variable
                                LyndsayHowarth

                                Personally I think you are making more work for yourself in the long run if you are scripting new records rather than using a relationship.... but if you must, don't forget that you can pass more than one value by separating them with a | or such then in your script you can then separate them into separate variables by calculation.

                                 

                                - Lyndsay

                                • 13. Re: Clipboard into variable
                                  alfred1963

                                  Be careful to leave Clipboard control to your User if you can, you should not use it if you can help it

                                   

                                  Nothing wrong with Relationships, I use them all the time of course in some cases it's just simpler to use this scripting way, I only needed to pass the persons name across. It's all about the fine art of keeping it simpler.

                                   

                                  Loosing not needed scrips as well as not needed relationships is good,  it's so easy to have a large relationship graph because one keeps creating more and more...

                                   

                                  At the same time Get (ScriptParameter) helps greatly to reduce script - repeating caused by crude logic.

                                   

                                  I think Xcode is a fine example of programming discipline enforced by the IDE even if I find it hard to switch.

                                   

                                  The best code is the one you don't have to write…

                                   

                                  FileMaker gives you all the freedom to end up having redundant code because you did not bother to go back and clean up...  Just early morning thoughts.

                                  • 14. Re: Clipboard into variable
                                    listen2earth

                                    Good Evening

                                     

                                    i Thank you!! for your excellent suggestion.

                                     

                                     

                                          

                                    r o b  'jesus Land Tidd'  lewis

                                        architect visionary for

                                        software & hardware

                                        

                                     

                                            disabled War

                                       Vet and Proud Of It

                                     

                                     

                                    Structures from silence -- earths

                                    dynamic airwave -- changes all