john renfrew Posted September 24, 2010 Posted September 24, 2010 (edited) My Scriptmaster4 file seems to have an issue... I have patiently imported and rebuilt all my scripts so I can re-do my RegisterGroovy steps using the gui=false etc etc etc BUT when I go and copy function to the clipboard it works only the first time, and then does not empty the clipboard to load a second or third. Any idea why?: ** Further to above, not only is is not clearing the clipboard but it is only copying the Groovy code not the *copyable* version ready to paste *** How about changing the last part of the field definition for copyable to be: Substitute ( Quote ( script & " ; isGui = " & If ( Is GUI function ; "true" ; "false" ) ) so if the box is ticked it does all you need to be able to copy and paste... Edited September 24, 2010 by Guest
Smef Posted September 24, 2010 Posted September 24, 2010 Are you clicking the "Copy to Clipboard" function under Option 3 after you click to register the function? I can't seem to reproduce the issue you are having When i click that button it copies the code ready to go into a set variable script step, such as RegisterGroovy( "ReadFileContents( pathToFile )" ; "if( pathToFile == null ) throw new Exception("You must supply a pathToFile parameter");¶ return new InputStreamReader( new FileInputStream( pathToFile ), "utf-8" );" ) I know there was an issue with an earlier build of the scriptmaster.fp7 file where code wasn't being copied to the clipboard at all, so you may want to try downloading the latest version from our site to make sure you have a version of the .fp7 file which will do that. Another issue is that the function is not copied to the clipboard with the isGui=false parameter on the end of the code. You will need to add that manually. We've fixed this internally and it will be included with our next update to scriptmaster. Finally, all you really need to do is add the "isGui=false" parameter to your current code, so you just need to copy and paste that on to the end of each of your register groovy functions. You don't need to re-generate the code from the scriptmaster file at all.
john renfrew Posted September 24, 2010 Author Posted September 24, 2010 Yes option 3 I have just spent 2 evenings recreating ALL the variables for my 80 scripts I imported into the v4 file and am not massively inclined to go through the whole process again. As per a previous post it would be helpful to have a script that will import other files and do this as part of the process I need to go through when you make a new version of the demo file. I am doing all of this to consolidate and tidy up all my loose code before I create my own plug-ins so would like to not have to do much copy and paste. I can copy and paste *all* of your scripts from a future file into this demo one, but any changes to field calcs or definitions will need to be carried over to. Seems to be creating redundant work for me..... Does the Demo file contain a version/ subversion info anywhere in it before I go starting all over again???
Smef Posted September 27, 2010 Posted September 27, 2010 We haven't made any changes to the modules themselves, so if you have them in your database already all you need to do is add the "isGui=false" flag at the end of the non-gui functions. You don't need to put them in our filemaker database (which is just used to deliver our pre-made modules to you) and then copy them out again. Also, you don't need to copy all of our modules to your database in order to use scriptmaster. Are you using all 80-ish modules that come with scriptmaster, or did you write you own? I recommend only registering the modules that you need to use in your database. If you write your own modules in an older version of a scriptmaster.fp7 file and then want to use a newer version of the file you can use a regular filemaker import to mode your data. Remember, though, that the scriptmaster.fp7 file is just a pre-made thing we give to you to help you understand how the modules are written. If you already have them in your database using the registerGroovy function you don't need to use the scriptmaster.fp7 file any more.
john renfrew Posted September 27, 2010 Author Posted September 27, 2010 I have 80 of my own, and am just moving to the advanced version to make my own plugins so wanted to rationalise everything in one place, as I wanted some of my scripting, some of yours and some where I had amended yours in one file so I could stop having to change multiple RegisterGroovy steps across a wide number of files.. And given that your demo file works so well it seemed the obvious place to do that , my point was that all the related input and output key values dont get copied across so they all have ot entered again manually, which is quite a lot for that many scripts Everything else seems fine now
Smef Posted September 29, 2010 Posted September 29, 2010 It's not possible to write a script to modify another script, unfortunately. If you are storing scriptmaster modules in one copy of the ScriptMaster.fp7 file you could import your records into a newer version of ScriptMaster.fp7 using filemaker's built-in import/export commands. If you are using multiple databases with the same modules being used in each of them you could also add a single scriptmaster.fp7 external data source. This way you only need to update the modules in the single location and then the updates will be reflected in the registration functions across all of your databases.
Recommended Posts
This topic is 5180 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now