Script

class pycanape.script.Script(dll: CANapeDll, asap3_handle: LP_tAsap3Hdl, script_handle: c_ulong)[source]

The Script class is not meant to be instantiated by the user. Instead, Script instances are returned by execute_script_ex().

Parameters:
get_script_result_string() str[source]

Returns a script result.

Returns:

result string of the script

Return type:

str

get_script_result_value() float[source]

Returns the exitcode of a script.

Returns:

result value of the script

Return type:

float

get_script_state() TScriptStatus[source]

Returns the state of a script.

Returns:

current state of the script

Return type:

TScriptStatus

release_script() None[source]

Removes a declared script from the Tasklist. To receive the result you must use the ‘SetScriptResult’ in your CASL script.

Return type:

None

start_script(*, command_line: str | None = None, current_device: Module | None = None) None[source]

Starts the script.

Parameters:
  • command_line (str | None) – Set a commandline for the script.

  • current_device (Module | None) – Set a module as current_device.

Return type:

None

stop_script() None[source]

Stop the script.

Return type:

None