Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

IsRegistered

Queries if plugin is registered with Complete key.

Component: Plugin
Version: 3.0
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "IsRegistered" )

Parameters

none

Result

Returns 1 if the plugin is registered or 0 if not.

Description

Queries if plugin is registered with Complete key.

See also Register, IsRuntime, IsServer and isClient.

Examples

Check if plugin is registered:

$v = MBS("IsRegistered")

Register only when needed:

If [MBS("IsRegistered") ≠ 1]
    If [MBS("IsRuntime")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Runtime"; 123; 123)]
    Else If [MBS("IsServer")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Server"; 123; 123)]
    Else
        Set Variable [$r; Value:MBS("Register"; "test"; "5 seats"; 123; 123)]
    End If
End If

Register with Startup script for server and client:

Startup Script:

#Register for client
Perform Script [“InitMBS”]
#Register for server. Will be ignored if no server or no plugin installed on server
Perform Script on Server [“InitMBS”]


InitMBS script:

#Enable debug logging. Shows messages in DebugView/Console.app
Set Variable [$r; Value:MBS("Trace")]
#Register if needed for right platform
If [MBS("IsRegistered") = 0]
    If [MBS("IsRuntime")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Complete"; "Runtime"; 123; 123)]
    Else If [MBS("IsServer")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Complete"; "Server"; 123; 123)]
    Else If [MBS("IsClient")]
        Set Variable [$r; Value:MBS("Register"; "test"; "Complete"; "5 Seats"; 123; 123)]
    Else
        Set Variable [$r; Value:"Unknown platform: " & MBS("Platform")]
    End If
    #Show errors, so developer can fix them
    If [$r ≠ "OK"]
        Show Custom Dialog ["InitMBS failed."; $r]
    End If
End If
#May initialize other stuff
#like dynapdf with library in extensions folder
If [MBS("DynaPDF.IsInitialized") = 0]
    Set Variable [$DynaPDFLicense; Value:"1003637-16022016-3-8-12-685C57F..."]
    If [MBS("IsWindows")]
        Set Variable [$r; Value:MBS( "DynaPDF.Initialize"; "dynapdf.dll"; $DynaPDFLicense)]
    Else If [MBS("IsMacOSX")]
        Set Variable [$r; Value:MBS( "DynaPDF.Initialize"; "dynapdf.dylib"; $DynaPDFLicense)]
    Else
        Set Variable [$r; Value:"Unknown platform: " & MBS("Platform")]
    End If
    #Show errors, so developer can fix them
    If [$r ≠ "OK"]
        Show Custom Dialog ["InitMBS failed."; $r]
    End If
End If

See also


IsMacOSX   -   IsRuntime

Feedback: Report problem or ask question.




Links
MBS Real Studio PDF Plugins - Pfarrgemeinde St. Arnulf Nickenich