Specifications
plug-in these entry points are never invoked. See also creating a scripted plug-in, configurator
guidelines and detecting third-party applications.
Is invoked for a scripted plug-in to discover the associated third-party
application – if any.
findApplicationPath( e
: Environment, startup
: Boolean ) : String
Returns the absolute file path for the third-party application’s
executable (“.exe” on Windows, “.app” on Mac). If the entry point
returns null or the empty string, this means that the script cannot
discover the application and that the user will need to set the
application path.
The startup argument is true when this entry point is invoked during
Switch startup, and false when invoked as a result of a user action
(that is, not during startup). When startup is true, the entry point
should not perform time-consuming operations. The
Environment.findApplicationOnDisk() function is automatically disabled
(it returns an empty string without searching) so it is safe to call this
function without explicitly checking for startup.
If this entry point is absent, Switch offers no user interface for setting
an application path for this scripted plug-in; otherwise it does (even
if the script can determine the application path).
Is invoked for a scripted plug-in to discover the licensing state of the
associated third-party application. Returns one of the following strings
getApplicationLicensing(
e : Environment ) :
String
to indicate the licensing state: “Licensed”, “Demo”, “Trial”,
“Unlicensed”, “Unknown”. The Switch designer displays a localized
version of these strings.
If this entry point is absent, this means the licensing state is irrelevant
or cannot be discovered even in principle. This not the same thing as
returning “Unknown”, which means there is a mechanism for
discovering the licensing state but it failed this time to produce a
conclusive result.
Is invoked when the user enters or modifies the license key for the
scripted plug-in in the designer. Attempts to license the associated
third-party application with the specified string.
licenseApplication( e :
Environment, license :
String )
If this entry point is absent, Switch offers no user interface for entering
a license key for this scripted plug-in.
Persistent execution
The optional entry points described in this section are invoked only for scripts with the persistent
execution mode. They are invoked at the appropriate times to help the script with managing
resources that persist across invocations of the regular execution entry points described above.
If the script has the persistent execution mode, this optional entry point
is invoked to allow the script to initialize any persistent resources it may
initializeProcessing(
e : Environment ) :
Boolean
need. The entry point is called “lazily”, that is, it’s invoked only when
Switch receives the first processing request for a script instance of this
type after startup or after the most recent finalize or abort.
447
Enfocus Switch 10