Exemplo n.º 1
0
 static public MotionResult TextEntry(
     this IHostToScript sanderling,
     string text) =>
 sanderling?.MotionExecute(new Motor.MotionParam()
 {
     TextEntry = text,
 });
Exemplo n.º 2
0
 static public MotionResult KeyboardPressCombined(
     this IHostToScript sanderling,
     IEnumerable <VirtualKeyCode> setKey) =>
 sanderling?.MotionExecute(new Motor.MotionParam()
 {
     KeyDown = setKey?.ToArray(),
     KeyUp   = setKey?.Reverse()?.ToArray(),
 });
Exemplo n.º 3
0
 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,
 });
Exemplo n.º 4
0
 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 },
 });
Exemplo n.º 5
0
 static public MotionResult MouseClick(
     this IHostToScript host,
     IUIElement destination,
     MouseButtonIdEnum mouseButton) =>
 MouseMove(host, destination, new[] { mouseButton });
Exemplo n.º 6
0
 static public MotionResult MouseClick(
     this IHostToScript host,
     IUIElement destination,
     MouseButtonIdEnum mouseButton) =>
 host?.MotionExecute(destination.MouseClick(mouseButton));
Exemplo n.º 7
0
 static public MotionResult WindowToForeground(
     this IHostToScript sanderling) =>
 sanderling?.MotionExecute(new Motor.MotionParam()
 {
     WindowToForeground = true,
 });
Exemplo n.º 8
0
 static public IEnumerable <MotionResult> KeyboardPressSequence(
     this IHostToScript sanderling,
     IEnumerable <VirtualKeyCode> listKey) =>
 listKey?.Select(key => sanderling?.KeyboardPressCombined(new[] { key }));
Exemplo n.º 9
0
 static public MotionResult MouseClickLeft(
     this IHostToScript Host,
     IUIElement Destination) =>
 MouseClick(Host, Destination, MouseButtonIdEnum.Left);
Exemplo n.º 10
0
 static public MotionResult MouseClick(
     this IHostToScript Host,
     IUIElement Destination,
     MouseButtonIdEnum MouseButton) =>
 MouseMove(Host, Destination, new[] { MouseButton });
Exemplo n.º 11
0
 static public MotionResult TextEntry(
     this IHostToScript sanderling,
     string text) =>
 sanderling?.MotionExecute(text?.TextEntry());
Exemplo n.º 12
0
 static public MotionResult KeyUp(
     this IHostToScript sanderling,
     VirtualKeyCode key) =>
 sanderling?.MotionExecute(key.KeyUp());
Exemplo n.º 13
0
 static public MotionResult KeyUp(
     this IHostToScript sanderling,
     IEnumerable <VirtualKeyCode> listKey) =>
 sanderling?.MotionExecute(listKey?.KeyUp());
Exemplo n.º 14
0
 static public MotionResult KeyboardPressCombined(
     this IHostToScript sanderling,
     IEnumerable <VirtualKeyCode> setKey) =>
 sanderling?.MotionExecute(setKey?.KeyboardPressCombined());
Exemplo n.º 15
0
 static public MotionResult MouseDragAndDrop(
     this IHostToScript host,
     IUIElement elementToDrag,
     IUIElement destination,
     MouseButtonIdEnum mouseButton) =>
 host?.MotionExecute(elementToDrag?.MouseDragAndDropOn(destination, mouseButton));
Exemplo n.º 16
0
 static public MotionResult MouseClickRight(
     this IHostToScript host,
     IUIElement destination) =>
 MouseClick(host, destination, MouseButtonIdEnum.Right);
Exemplo n.º 17
0
 static public MotionResult MouseDragAndDrop(
     this IHostToScript host,
     IUIElement elementToDrag,
     IUIElement destination) =>
 MouseDragAndDrop(host, elementToDrag, destination, MouseButtonIdEnum.Left);
Exemplo n.º 18
0
 static public MotionResult MouseDragAndDrop(
     this IHostToScript Host,
     IUIElement ElementToDrag,
     IUIElement Destination) =>
 MouseDragAndDrop(Host, ElementToDrag, Destination, MouseButtonIdEnum.Left);
Exemplo n.º 19
0
 static public MotionResult KeyboardPress(
     this IHostToScript sanderling,
     VirtualKeyCode key) =>
 sanderling?.KeyboardPressCombined(new[] { key });
Exemplo n.º 20
0
 static public void WaitForMeasurement(this IHostToScript sanderling) =>
 sanderling?.MemoryMeasurement?.Value?.VersionString?.ToArray();
Exemplo n.º 21
0
 static public bool WindowPostMessage(this IHostToScript host, uint msg, IntPtr wParam, IntPtr lParam = default(IntPtr)) =>
 BotEngine.WinApi.User32.PostMessage(host.WindowHandle, msg, wParam, lParam);
Exemplo n.º 22
0
 static public bool WindowPostMessageKeyUp(this IHostToScript host, VirtualKeyCode key, IntPtr lParam = default(IntPtr)) =>
 host.WindowPostMessage(0x101, (IntPtr)key, lParam);
Exemplo n.º 23
0
 static public void InvalidateMeasurement(this IHostToScript sanderling) =>
 sanderling?.InvalidateMeasurement(0);
Exemplo n.º 24
0
 static public MotionResult MouseMove(
     this IHostToScript host,
     IUIElement destination,
     MouseButtonIdEnum[] mouseButton = null) =>
 host?.MotionExecute(destination.MouseMove(mouseButton));