Class script
Script task functions. Run, get properties, set options, etc. A script task is a running script, except if role editorExtension. Each script task is a separate process.
public static class script
Namespace: Au
Assembly: Au.dll
Properties
| Name | Description |
|---|---|
| isDebug | Returns |
| isInPip | Returns true if this process is running in a child session (aka Picture-in-Picture). This function is an alias of miscInfo.isChildSession. |
| isWpfPreview | Returns |
| name | Gets the script name, like |
| paused | If |
| role | Gets the script role (miniProgram, exeProgram or editorExtension). |
| testing | Returns |
Methods
| Name | Description |
|---|---|
| debug(bool) | Attaches the LibreAutomate's debugger to this process, or waits for a debugger attached to this process. Does nothing if a debugger is already attached. |
| end() | Ends this process. |
| end(int) | Ends another script process. |
| end(string) | Ends all task processes of a script. |
| isRunning(int) | Returns |
| isRunning(string) | Returns |
| pause(string, bool) | If was pressed the pause key, waits until the user presses it again. |
| restart(params string[]) | Starts this script or program again. |
| run(string, params string[]) | Starts executing a script. Does not wait. |
| runInPip(string, params string[]) | Starts executing a script in child session running in picture-in-picture (PiP) window. Does not wait. |
| runWait(Action<string>, string, params string[]) | Starts executing a script, waits until the task ends and gets script.writeResult text in real time. |
| runWait(string, params string[]) | Starts executing a script and waits until the task ends. |
| runWait(out string, string, params string[]) | Starts executing a script, waits until the task ends and then gets script.writeResult text. |
| setup(bool, bool, bool, bool, UExcept, KKey, KKey, string) | Adds various features to this script task (running script): tray icon, exit on |
| single(string, int, bool, Action) | Ensures that multiple processes that call this function don't run simultaneously. Like C# |
| sourcePath(bool, Assembly) | Gets path of the main source code file of this program or of a library. |
| sourcePath(string) | Gets path of the caller source code file. |
| trayIcon(int, Action<trayIcon>, Action<trayIcon, popupMenu>, string) | Adds standard tray icon. |
| writeResult(string) | Writes a string result for the task that called script.runWait or script.runWait to run this task, or for the program that started this task using command line like |