Class WindowTriggers
Window triggers.
public class WindowTriggers : IEnumerable<WindowTrigger>
Examples
Note: the Triggers in examples is a field or property like readonly ActionTriggers Triggers = new();
.
var wt = Triggers.Window; //wt is a WindowTriggers instance
wt[TWEvent.ActiveNew, "Window name"] = o => print.it(o.Window);
wt[TWEvent.Visible, "Window2 name"] = o => print.it(o.Window);
Triggers.Run();
More examples: ActionTriggers.
Namespace: Au.Triggers
Assembly: Au.dll
Properties
Name | Description |
---|---|
this[TWEvent, wndFinder, TWFlags, TWLater, string, int] | Adds a window trigger and its action. |
this[TWEvent, string, string, WOwner, Func<wnd, bool>, WContains, TWFlags, TWLater, string, int] | Adds a window trigger and its action. |
Last | The last added trigger. |
Methods
Name | Description |
---|---|
GetEnumerator() | Used by |
LogEvents(bool, Func<wnd, bool>) | Starts or stops to log (write in output) window events that can help to create or debug window triggers. |
SimulateActiveNew(wnd) | Simulates event "activated new window" as if the the specified window is that window. |
SimulateVisibleNew(wnd) | Simulates event "visible new window" as if the specified window is that window. Similar to WindowTriggers.SimulateActiveNew. |