protected override sealed async Task FinishThrowFishingRodAsync(IInteractionProvider provider) { // Simply throw the fishing rod straight, without checking for bubbles. Coordinates coords = new Coordinates(800, 1009); var pos = provider.GetCurrentWindowPosition(); coords = pos.RelativeToAbsoluteCoordinates(pos.ScaleCoordinates(coords, MouseHelpers.ReferenceWindowSize)); provider.MoveMouse(coords); await provider.WaitAsync(300); provider.ReleaseMouseButton(); }
public static async Task DoSimpleMouseClickAsync(IInteractionProvider provider, Coordinates coords, VerticalScaleAlignment valign = VerticalScaleAlignment.Center, int buttonDownTimeout = 200) { var pos = provider.GetCurrentWindowPosition(); coords = pos.RelativeToAbsoluteCoordinates(pos.ScaleCoordinates(coords, ReferenceWindowSize, valign)); provider.MoveMouse(coords); provider.PressMouseButton(); await provider.WaitAsync(buttonDownTimeout); provider.ReleaseMouseButton(); }
protected override sealed async Task FinishCastFishingRodAsync(IInteractionProvider provider) { // Simply cast the fishing rod straight, without checking for bubbles. var coords = new Coordinates(800, 1009); var pos = provider.GetCurrentWindowPosition(); coords = pos.ScaleCoordinates(coords, MouseHelpers.ReferenceWindowSize); provider.MoveMouse(coords); await provider.WaitAsync(300); provider.ReleaseMouseButton(); }
public static async Task DoSimpleMouseClickAsync(IInteractionProvider provider, Coordinates coords, VerticalScaleAlignment valign = VerticalScaleAlignment.Center, int buttonDownTimeout = 150) { var pos = provider.GetCurrentWindowPosition(); coords = pos.ScaleCoordinates(coords, ReferenceWindowSize, valign); provider.MoveMouse(coords); provider.PressMouseButton(); await provider.WaitAsync(buttonDownTimeout); provider.ReleaseMouseButton(); }
/// <summary> /// Clicks on the fishing rod button. /// </summary> /// <param name="provider"></param> /// <returns></returns> protected async Task StartCastFishingRodAsync(IInteractionProvider provider) { var coords = new Coordinates(800, 846); var pos = provider.GetCurrentWindowPosition(); coords = pos.ScaleCoordinates(coords, MouseHelpers.ReferenceWindowSize); // Move the mouse and press the button. provider.MoveMouse(coords); provider.PressMouseButton(); await provider.WaitAsync(300); CheckForFishErrorDialog(provider); }
/// <summary> /// Clicks on the fishing rod button. /// </summary> /// <param name="provider"></param> /// <returns></returns> protected async Task StartCastFishingRodAsync(IInteractionProvider provider) { Coordinates coords = new Coordinates(800, 846); var pos = provider.GetCurrentWindowPosition(); coords = pos.RelativeToAbsoluteCoordinates(pos.ScaleCoordinates(coords, MouseHelpers.ReferenceWindowSize)); // Move the mouse and press the button. provider.MoveMouse(coords); provider.PressMouseButton(); await provider.WaitAsync(300); CheckForFishErrorDialog(provider); }