Class opt
Options for some functions of this library.
public static class opt
Remarks
Some frequently used static functions of this library have some options (settings). For example keys.send allows to change speed, text sending method, etc. Passing options as parameters in each call usually isn't what you want to do in automation scripts. Instead you can set options using static properties. This class contains several groups of options for functions of various classes. See examples.
There are two sets of identical or similar options - in class opt and in class opt.init:
- opt - thread-static options (each thread has its own instance). Functions of this library use them. You can change or change-restore them anywhere in script. Initial options are automatically copied from opt.init when that group of options (Key, Mouse, etc) is used first time in that thread (explicitly or by library functions).
- opt.init - static options. Contains initial property values for opt. Normally you change them when script starts. Don't change later, it's not thread-safe.
Examples
opt.key.KeySpeed = 50;
Set options for trigger actions.
Triggers.Options.BeforeAction = o => { opt.key.KeySpeed = 50; };
Namespace: Au
Assembly: Au.dll
Properties
Name | Description |
---|---|
key | Options for keyboard and clipboard functions (classes keys, clipboard and functions that use them). |
mouse | Options for mouse functions (class mouse and functions that use it). |
warnings | Options for showing run-time warnings and other info that can be useful to find problems in code at run time. |