class Accessibility::ShiftWindow

Public Class Methods

new(args = {:x => 0,:y => 0,:width => 0,:height => 0})

creates an ShiftWindow command that will alter the provided dimensions of the current running app window. Requires a hash that will be inspected for any/all of the following details:

  • x - The delta for the x coordinate of the current window

  • y - The delta for the y coordinate of the current window

  • width - The delta for the width of the current window

  • height - The delta for the height of the current window

    Examples:

    • To increase the height of the current window by 10:

      ShiftWindow.new(:height => 10).run
      
    • To decrease the height of the current window by 10:

      ShiftWindow.new(:height => -10).run
      
    • To increase the width of the current window by 10:

      ShiftWindow.new(:width => 10).run
      
    • To decrease the width of the current window by 10:

      ShiftWindow.new(:width => -10).run
      
    • To bump the window right by 10:

      ShiftWindow.new(:x => 10).run
      
    • To bump the window left by 10:

      ShiftWindow.new(:x => -10).run
      
    • To bump the window up by 10:

      ShiftWindow.new(:y => -10).run
      
    • To bump the window down by 10:

      ShiftWindow.new(:y => 10).run
      
    • To change everything:

      ShiftWindow.new(:x => 10,:y => 10,:width => 20,:height => -20).run
      

Public Instance Methods

run()