def move_mouse_randomly
      x, y = get_cursor_pos

      # For some reason, x or y returns as nil sometimes
      if x && y
        x1, y1 = x + rand(3) - 1, y + rand(3) - 1
        mouse_event(MOUSEEVENTF_ABSOLUTE, x1, y1, 0, 0)
        puts "Cursor positon set to #{x1}, #{y1}"
      else
        puts "X: #{x}, Y: #{y}, last error: #{Win::Error::get_last_error}"
      end
    end
def move_mouse_randomly
      x, y = get_cursor_pos

      # For some reason, x or y returns as nil sometimes
      if x && y
        x1, y1 = x + rand(3) - 1, y + rand(3) - 1
        mouse_event(MOUSEEVENTF_ABSOLUTE, x1, y1, 0, 0)
        puts "Cursor positon set to #{x1}, #{y1}"
      else
        puts "X: #{x}, Y: #{y}, last error: #{Win::Error::get_last_error}"
      end
    end
seconds