Ejemplo n.º 1
0
 def set_coords_indiv(self, x_inp, y_inp, passive=False):
     if int(x_inp) <= self.X_MAX and int(x_inp) >= 0 and int(
             y_inp) <= self.Y_MAX and int(y_inp) >= 0:
         x_inp = '%4d' % int(x_inp)
         y_inp = '%4d' % int(y_inp)
         if not passive:
             return self.movement.doCommand("s", [x_inp, y_inp])
         else:
             return self.movement.doCommand("sp", [x_inp, y_inp])
     else:
         raise ScrapException("x_inp or y_inp is out of bounds")
Ejemplo n.º 2
0
 def move_coords(self, x_inp, y_inp):
     if abs(int(x_inp)) <= self.X_MAX and abs(int(y_inp)) <= self.Y_MAX:
         return self.movement.doCommand("m", [x_inp, y_inp])
     else:
         raise ScrapException("x_inp or y_inp is too big to move")
Ejemplo n.º 3
0
 def move_y(self, y_inp):
     if abs(int(y_inp)) <= self.Y_MAX:
         return self.movement.doCommand("mY", [y_inp])
     else:
         raise ScrapException("y_inp is too big a move")
Ejemplo n.º 4
0
 def move_x(self, x_inp):
     if abs(int(x_inp)) <= self.X_MAX:
         return self.movement.doCommand("mX", [x_inp])
     else:
         raise ScrapException("x_inp is too big a move")
Ejemplo n.º 5
0
 def set_y(self, y_inp):
     if int(y_inp) <= self.Y_MAX and int(y_inp) >= 0:
         return self.movement.doCommand("sY", [y_inp])
     else:
         raise ScrapException("y_inp is out of bounds")
Ejemplo n.º 6
0
 def set_x(self, x_inp):
     if int(x_inp) <= self.X_MAX and int(x_inp) >= 0:
         return self.movement.doCommand("sX", [x_inp])
     else:
         raise ScrapException("x_inp is out of bounds")