public static ISerializableBotTask DragElementTo(this IUIElement from, IUIElement to, VirtualKeyCode?modifier = null) { return(new BotTask(nameof(DragElementTo)) { ClientActions = new[] { from.MouseClick(MouseButtonIdEnum.Left).AsRecommendation(), modifier?.KeyDown()?.AsRecommendation(), from.MouseDragAndDropOn(to.RegionInteraction, MouseButtonIdEnum.Left) .AsRecommendation(), modifier?.KeyUp()?.AsRecommendation(), } }); }
static public MotionResult KeyUp( this IHostToScript sanderling, VirtualKeyCode key) => sanderling?.MotionExecute(key.KeyUp());