static public MotionResult TextEntry( this IHostToScript sanderling, string text) => sanderling?.MotionExecute(new Motor.MotionParam() { TextEntry = text, });
static public MotionResult KeyboardPressCombined( this IHostToScript sanderling, IEnumerable <VirtualKeyCode> setKey) => sanderling?.MotionExecute(new Motor.MotionParam() { KeyDown = setKey?.ToArray(), KeyUp = setKey?.Reverse()?.ToArray(), });
static public MotionResult MouseMove( this IHostToScript host, IUIElement destination, MouseButtonIdEnum[] mouseButton = null) => host?.MotionExecute(new Motor.MotionParam() { MouseListWaypoint = new[] { new Motor.MotionParamMouseRegion() { UIElement = destination }, }, MouseButton = mouseButton, });
static public MotionResult MouseDragAndDrop( this IHostToScript host, IUIElement elementToDrag, IUIElement destination, MouseButtonIdEnum mouseButton) => host?.MotionExecute(new Motor.MotionParam() { MouseListWaypoint = new[] { elementToDrag, destination }.Select(uIElement => new Motor.MotionParamMouseRegion() { UIElement = uIElement })?.ToArray(), MouseButton = new[] { mouseButton }, });
static public MotionResult MouseClick( this IHostToScript host, IUIElement destination, MouseButtonIdEnum mouseButton) => MouseMove(host, destination, new[] { mouseButton });
static public MotionResult MouseClick( this IHostToScript host, IUIElement destination, MouseButtonIdEnum mouseButton) => host?.MotionExecute(destination.MouseClick(mouseButton));
static public MotionResult WindowToForeground( this IHostToScript sanderling) => sanderling?.MotionExecute(new Motor.MotionParam() { WindowToForeground = true, });
static public IEnumerable <MotionResult> KeyboardPressSequence( this IHostToScript sanderling, IEnumerable <VirtualKeyCode> listKey) => listKey?.Select(key => sanderling?.KeyboardPressCombined(new[] { key }));
static public MotionResult MouseClickLeft( this IHostToScript Host, IUIElement Destination) => MouseClick(Host, Destination, MouseButtonIdEnum.Left);
static public MotionResult MouseClick( this IHostToScript Host, IUIElement Destination, MouseButtonIdEnum MouseButton) => MouseMove(Host, Destination, new[] { MouseButton });
static public MotionResult TextEntry( this IHostToScript sanderling, string text) => sanderling?.MotionExecute(text?.TextEntry());
static public MotionResult KeyUp( this IHostToScript sanderling, VirtualKeyCode key) => sanderling?.MotionExecute(key.KeyUp());
static public MotionResult KeyUp( this IHostToScript sanderling, IEnumerable <VirtualKeyCode> listKey) => sanderling?.MotionExecute(listKey?.KeyUp());
static public MotionResult KeyboardPressCombined( this IHostToScript sanderling, IEnumerable <VirtualKeyCode> setKey) => sanderling?.MotionExecute(setKey?.KeyboardPressCombined());
static public MotionResult MouseDragAndDrop( this IHostToScript host, IUIElement elementToDrag, IUIElement destination, MouseButtonIdEnum mouseButton) => host?.MotionExecute(elementToDrag?.MouseDragAndDropOn(destination, mouseButton));
static public MotionResult MouseClickRight( this IHostToScript host, IUIElement destination) => MouseClick(host, destination, MouseButtonIdEnum.Right);
static public MotionResult MouseDragAndDrop( this IHostToScript host, IUIElement elementToDrag, IUIElement destination) => MouseDragAndDrop(host, elementToDrag, destination, MouseButtonIdEnum.Left);
static public MotionResult MouseDragAndDrop( this IHostToScript Host, IUIElement ElementToDrag, IUIElement Destination) => MouseDragAndDrop(Host, ElementToDrag, Destination, MouseButtonIdEnum.Left);
static public MotionResult KeyboardPress( this IHostToScript sanderling, VirtualKeyCode key) => sanderling?.KeyboardPressCombined(new[] { key });
static public void WaitForMeasurement(this IHostToScript sanderling) => sanderling?.MemoryMeasurement?.Value?.VersionString?.ToArray();
static public bool WindowPostMessage(this IHostToScript host, uint msg, IntPtr wParam, IntPtr lParam = default(IntPtr)) => BotEngine.WinApi.User32.PostMessage(host.WindowHandle, msg, wParam, lParam);
static public bool WindowPostMessageKeyUp(this IHostToScript host, VirtualKeyCode key, IntPtr lParam = default(IntPtr)) => host.WindowPostMessage(0x101, (IntPtr)key, lParam);
static public void InvalidateMeasurement(this IHostToScript sanderling) => sanderling?.InvalidateMeasurement(0);
static public MotionResult MouseMove( this IHostToScript host, IUIElement destination, MouseButtonIdEnum[] mouseButton = null) => host?.MotionExecute(destination.MouseMove(mouseButton));