Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

5.01 incompatible with 4.42 functions

Featured Replies

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 by john renfrew

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

  • 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

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

  • 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

 

Screen Shot 2017-05-11 at 17.09.41.png

  • Author

OK, to clarify that was 5.02 on 16

THIS is 4.42 on 15

 

Screen Shot 2017-05-11 at 17.22.26.png

 

And. Sorry, I mis-spoke as they say

the script couldn't see the functions

this is 5.02 in 16

 

Screen Shot 2017-05-11 at 17.32.01.png

Edited by john renfrew

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.