May 10, 20178 yr in the older version the function would be RegisterGroovy( "SMisLoaded" ; "return true; isGui=false" ) now it is RegisterGroovy( "SMisLoaded" ; "return true"; "isGui=false" ) therefore ALL functions written with previous version fails ANY SUGGESTIONS?? Edited May 10, 20178 yr by john renfrew
May 11, 20178 yr John, The main issue is that the RegisterGroovy function in ScriptMaster v5 isn't treating the third parameter optionally, even though it's inside curly braces: ## ScriptMaster v5 ## RegisterGroovy( signature ; script {; isGui ; key1=value2 ; ... } ) ## omitting third parameter in RegisterGroovy function returns ## "java.lang.ArrayIndexOutOfBoundsException: 0" instead of 1 Let ( ~result = RegisterGroovy( "SMisLoaded" ; "return true;" ) ; Case ( ~result = "ERROR" ; SMLastError ; ~result ) ) The secondary issue is that the RegisterGroovy function in ScriptMaster v4 looked for “isGui=false” an optional “key=value” pair. I don’t think including it at the end of the groovy script actually did anything, especially after "return true" processed. ## ScriptMaster v4 ## RegisterGroovy( signature; script{; key1=value1; key2=value2; …} ) ## best practice if you don't need a GUI RegisterGroovy( "SMisLoaded" ; "return true;" ; "isGui=false" ) ; ## not wrong, just doesn't affect the GUI RegisterGroovy( "SMisLoaded" ; "return true; isGui=false" ) ; We'll let you know when we have an update. Michael
May 11, 20178 yr Author Thanks Michael My version of the file that I have been developing in for quite are years with the plugin gives "return true; isGui=false" We need a way for 16 and pre 16 to exist in the same environment, and I am not sure I like the idea of adjusting all my scrip steps, as you know i am a heavy user of the plugin.. john
May 11, 20178 yr John, Again, there's a bug in ScriptMaster v5 which is causing an error if the third parameter is empty. Once that is fixed your functions should resume working as they have before. However, adding "isGui=false" to the end of your script (as the second parameter) doesn't do anything except make your function run a little slower than if you were to leave it out completely: ## how "isGui=false" is passed to RegisterGroovy RegisterGroovy ( "Test1" ; "return true;" ) RegisterGroovy ( "Test2" ; "return true; isGui=false" ) ## your script RegisterGroovy ( "Test3" ; "return true;" ; "isGui=true" ) RegisterGroovy ( "Test4" ; "return true;" ; "isGui=false" ) ## recommended ## Total time is takes to call each registered function 1000 times: Test1: 4588 ms Test2: 4864 ms ## your script Test3: 5223 ms Test4: 93 ms ## recommended You can test this with ScriptMaster v4 for now: http://s3-external-1.amazonaws.com/com.prosc.support.uploads/Outbound/ScriptMasterGuiTest.fmp12.zip?AWSAccessKeyId=AKIAIDQUCQL7APZLJCDA&Expires=1497109423&Signature=f7C5P0zEz193czErKG83a8VRNhM%3D Michael
May 11, 20178 yr Author Thanks for the prompt attention The 5.02 version on the site seems to work as I expected, will look at amending the script steps as required.. Are you sure?? here's my results
May 11, 20178 yr Author OK, to clarify that was 5.02 on 16 THIS is 4.42 on 15 And. Sorry, I mis-spoke as they say the script couldn't see the functions this is 5.02 in 16 Edited May 11, 20178 yr by john renfrew
May 11, 20178 yr The functions aren't actually getting registered with ScriptMaster v5. Always test for errors kids. http://s3-external-1.amazonaws.com/com.prosc.support.uploads/Outbound/ScriptMasterGuiTest.fmp12.zip?AWSAccessKeyId=AKIAIDQUCQL7APZLJCDA&Expires=1497112821&Signature=O%2B%2B3nWn%2BmTE6N6GkZh5YICZN2KM%3D
Create an account or sign in to comment