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