03-16-2024, 07:08 AM
The same without FuncOf.
[Triggers]
void Example_mouse_trigger_with_FilterOf_and_menu() {
wnd childWindow = default; //we use this variable to pass the child window handle to the trigger action
Triggers.Of.Window(cn: "Notepad*", also: o => { childWindow = wnd.fromMouse(WXYFlags.NeedControl); return childWindow.ClassNameIs("Scintilla"); });
Triggers.Mouse[TMClick.Right, flags: TMFlags.ButtonModUp] = o => { script.run(@"Example_mouse_trigger_with_FilterOf_and_menu.cs", $"{childWindow.Handle}"); };
Triggers.Of.AllWindows();
}