The script commands module.
These commands are used in the following models:
MP5103
THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED.
Please report an issue if one is found.
Attributes and Functions
- script.delete()
- script.load()
- script.new()
- script.newautorun()
- script.restore()
Script
Bases: BaseTSPCmd
The script command tree.
Properties and methods
.delete(): The script.delete() function.
.load(): The script.load() function.
.new(): The script.new() function.
.newautorun(): The script.newautorun() function.
.restore(): The script.restore() function.
delete
delete(script_name: str) -> None
Run the script.delete() function.
Description
- This function deletes a script from nonvolatile memory.
TSP Syntax
| Parameters: |
-
script_name
(str)
–
The string that represents the name of the script.
|
load
load(file: str, name: str | None = None) -> str
Run the script.load() function.
Description
- This function creates a script from a specified file.
TSP Syntax
| Parameters: |
-
file
(str)
–
The path and file name of the script file to load.
-
name
(optional, default:
None
)
–
The name of the script to be created.
|
| Returns: |
-
str
–
The result of the function call.
|
new
new(code: str, name: str | None = None) -> str
Run the script.new() function.
Description
- This function creates a script.
TSP Syntax
| Parameters: |
-
code
(str)
–
A string containing the body of the script.
-
name
(optional, default:
None
)
–
|
| Returns: |
-
str
–
The result of the function call.
|
newautorun
newautorun(code: str, name: str | None = None) -> str
Run the script.newautorun() function.
Description
- This function creates a script and enables autorun.
TSP Syntax
| Parameters: |
-
code
(str)
–
A string that contains the body of the script.
-
name
(optional, default:
None
)
–
|
| Returns: |
-
str
–
The result of the function call.
|
restore
restore(name: str) -> None
Run the script.restore() function.
Description
- This function restores a script that was removed from the runtime environment.
TSP Syntax
| Parameters: |
-
name
(str)
–
The name of the script to be restored.
|