Documentation for Axxon PSIM 1.0.0-1.0.1.

Previous page The DebugLogString method  The Sleep method Next page


The Base64Decode method is used to decode strings that are encoded by the Base64 scheme.

Syntax for method invocation:

function Base64Decode(data_in: String, WideChar: Boolean)

Method arguments:

  1. data_in is a required argument. It specifies the Base64 string that you want to decode;
  2. WideChar is a required argument. It specifies the encoding type. Possible values: 0 or 1. If the encoding type is Unicode, the argument value is 1, otherwise 0.

Example. On macro 1, decode the string specified in Base64. Output the decoding result in the debug window of the Editor-Debugger utility (the result is the "Axxon PSIM JScript" string).

if (Event.SourceType == "MACRO" && Event.SourceId == "1" && Event.Action == "RUN")
{
    var str = Base64Decode("SW50ZWxsZWN0IEpTY3JpcHQ= ", 0);
    DebugLogString(str);
}