Register Script for MBS Plugin
Your license script may look like this for a seats license:
With checking using IsRegistered function, we avoid to register again and again on each startup, which just wastes CPU time. And by using StoreRegistration, the license key is stored permanently, so this script doesn't need to run again until the old license key expired. When it expired and a new plugin doesn't accept it, the stored key gets deleted on startup silently and the script can install a new key. For server, you can do the same, but please don't use a custom dialog, but something like sending email to yourself.# Register MBS Plugin:
If [ MBS("IsRegistered") ≠ 1 ]
Set Variable [ $r ; Value: MBS("StoreRegistration"; "Your Name"; "Complete"; "5 Seats"; 202212; "...") ]
If [$r ≠ "OK"]
Show Custom Dialog ["Problem with MBS Plugin Registration"; $r]
End If
End If
# Register MBS Plugin:
If [ MBS("IsRegistered") ≠ 1 ]
Set Variable [ $r ; Value: MBS("StoreRegistration"; "Your Name"; "Complete"; "Server"; 202211; "...") ]
If [$r ≠ "OK"]
Send Mail [ Send via SMTP Server ; No dialog ; To: "admin@mycompany.com" ; Subject: "MBS License Problem" ; Message: $r ]
End If
End If
And you can combine this to pick the right license key depending on target:
Please do not hesitate to contact us with your questions.# Register MBS Plugin:
If [ MBS("IsRegistered") ≠ 1 ]
If [ MBS("IsServer") ]
# FileMaker Server:
Set Variable [ $r; Value: MBS("Register"; "Your Name"; "Complete"; "Server"; 202211; "...") ]
If [$r ≠ "OK"]
Send Mail [ Send via SMTP Server ; No dialog ; To: "admin@mycompany.com" ; Subject: "MBS License Problem" ; Message: $r ]
End If
Else
# FileMaker Pro:
Set Variable [ $r; Value: MBS("Register"; "Your Name"; "Complete"; "5 Seats"; 202211; "...") ]
If [$r ≠ "OK"]
Show Custom Dialog ["Problem with MBS Plugin Registration"; $r]
End If
End If
End If