/// <summary> /// Initializes a new instance of the <see cref="Click"/> class. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="button">The button.</param> /// <param name="movement">The movement.</param> /// <param name="delay">The delay.</param> /// <param name="repetitions">The repetitions.</param> /// <param name="speed">The speed.</param> /// <param name="shift">if set to <c>true</c> [shift].</param> /// <param name="ctrl">if set to <c>true</c> [control].</param> /// <param name="alt">if set to <c>true</c> [alt].</param> public Click(int x = 0, int y = 0, ButtonType button = ButtonType.LEFT, MovementType?movement = null, DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null, bool shift = false, bool ctrl = false, bool alt = false ) : this(new DecimalTuple(x), new DecimalTuple(y), button, movement, delay, repetitions, speed, shift, ctrl, alt) { }
/// <summary> /// Initializes a new instance of the <see cref="Hover"/> class. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="movement">The movement.</param> /// <param name="delay">The delay.</param> /// <param name="repetitions">The repetitions.</param> /// <param name="speed">The speed.</param> /// <param name="shift">if set to <c>true</c> [shift].</param> /// <param name="ctrl">if set to <c>true</c> [control].</param> /// <param name="alt">if set to <c>true</c> [alt].</param> public Hover(int x, int y, MovementType?movement = null, DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null, bool shift = false, bool ctrl = false, bool alt = false ) : this(new DecimalTuple(x), new DecimalTuple(y), movement, delay, repetitions, speed, shift, ctrl, alt) { }
/// <summary> /// Initializes a new instance of the <see cref="Click"/> class. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="button">The button.</param> /// <param name="movement">The movement.</param> /// <param name="delay">The delay.</param> /// <param name="repetitions">The repetitions.</param> /// <param name="speed">The speed.</param> /// <param name="shift">if set to <c>true</c> [shift].</param> /// <param name="ctrl">if set to <c>true</c> [control].</param> /// <param name="alt">if set to <c>true</c> [alt].</param> public Click(DecimalTuple x, DecimalTuple y, ButtonType button = ButtonType.LEFT, MovementType?movement = null, DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null, bool shift = false, bool ctrl = false, bool alt = false ) : base(x, y, movement, delay, repetitions, speed, shift, ctrl, alt) { ButtonType = button; }
/// <summary> /// Initializes a new instance of the <see cref="Drag"/> class. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="endX">The end x.</param> /// <param name="endY">The end y.</param> /// <param name="button">The button.</param> /// <param name="movement">The movement.</param> /// <param name="delay">The delay.</param> /// <param name="repetitions">The repetitions.</param> /// <param name="speed">The speed.</param> /// <param name="shift">if set to <c>true</c> [shift].</param> /// <param name="ctrl">if set to <c>true</c> [control].</param> /// <param name="alt">if set to <c>true</c> [alt].</param> public Drag(DecimalTuple x, DecimalTuple y, DecimalTuple endX, DecimalTuple endY, ButtonType button = ButtonType.LEFT, MovementType?movement = null, DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null, bool shift = false, bool ctrl = false, bool alt = false ) : base(x, y, button, movement, delay, repetitions, speed, shift, ctrl, alt) { EndX = endX; EndY = endY; }
/// <summary> /// Initializes a new instance of the <see cref="Hover"/> class. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="movement">The movement.</param> /// <param name="delay">The delay.</param> /// <param name="repetitions">The repetitions.</param> /// <param name="speed">The speed.</param> /// <param name="shift">if set to <c>true</c> [shift].</param> /// <param name="ctrl">if set to <c>true</c> [control].</param> /// <param name="alt">if set to <c>true</c> [alt].</param> public Hover(DecimalTuple x = null, DecimalTuple y = null, MovementType?movement = null, DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null, bool shift = false, bool ctrl = false, bool alt = false ) : base(delay, repetitions, speed, shift, ctrl, alt) { X = x; Y = y; MovementType = movement; }
/// <summary> /// Randomizes the position. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> internal void RandomizePosition(DecimalTuple x, DecimalTuple y) { if (x == null || y == null) { RandomizedPosition = Cursor.Vector; } else { RandomizedPosition = new Vector(x.Get(GlobalData.RandomX), y.Get(GlobalData.RandomY)); } }
/// <summary> /// Initializes a new instance of the <see cref="Hover"/> class. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="movement">The movement.</param> /// <param name="instruction">The instruction.</param> public Hover(Instruction instruction, DecimalTuple x = null, DecimalTuple y = null, MovementType?movement = null) : this(x, y, movement, instruction.Delay(), instruction.Repetitions, instruction.Speed(), instruction.Shift, instruction.Ctrl, instruction.Alt) { }
/// <summary> /// Initializes a new instance of the <see cref="Text"/> class. /// </summary> /// <param name="input">The input.</param> /// <param name="delay">The delay.</param> /// <param name="repetitions">The repetitions.</param> /// <param name="speed">The speed.</param> /// <param name="ctrl">if set to <c>true</c> [control].</param> /// <param name="alt">if set to <c>true</c> [alt].</param> public Text(string input = "", DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null, bool ctrl = false, bool alt = false ) : base(delay, repetitions, speed, false, ctrl, alt) { Input = input; }
/// <summary> /// Initializes a new instance of the <see cref="Click"/> class. /// </summary> /// <param name="x">The x.</param> /// <param name="y">The y.</param> /// <param name="button">The button.</param> /// <param name="movement">The movement.</param> /// <param name="instruction">The instruction.</param> public Click(Instruction instruction, DecimalTuple x = null, DecimalTuple y = null, ButtonType button = ButtonType.LEFT, MovementType?movement = null ) : this(x, y, button, movement, instruction.Delay(), instruction.Repetitions, instruction.Speed(), instruction.Shift, instruction.Ctrl, instruction.Alt) { }
/// <summary> /// Initializes a new instance of the <see cref="Wait"/> class. /// </summary> /// <param name="delay">The delay.</param> /// <param name="repetitions">The repetitions.</param> public Wait(DecimalTuple delay = null, DecimalTuple repetitions = null) : base(delay, repetitions) { }
/// <summary> /// Initializes a new instance of the <see cref="Keystroke"/> class. /// </summary> /// <param name="key">The key.</param> /// <param name="delay">The delay.</param> /// <param name="repetitions">The repetitions.</param> /// <param name="speed">The speed.</param> /// <param name="shift">if set to <c>true</c> [shift].</param> /// <param name="ctrl">if set to <c>true</c> [control].</param> /// <param name="alt">if set to <c>true</c> [alt].</param> public Keystroke(VirtualKeyCode key=VirtualKeyCode.SPACE, DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null, bool shift = false, bool ctrl = false, bool alt = false ) : base(delay, repetitions, speed, shift, ctrl, alt) { Key = key; }
public void Delay(DecimalTuple delay) { _delay = delay; }