def __init__(self):
     PyMouseEvent.__init__(self)
     self.logger = logger.getChild("mouse")
     self.logger.setLevel(logging.INFO)
     self.new_event = threading.Event()
     self.pos = None
     self._reset_data()
    def __init__(self, object2notify):
        """Create MouseListener.

        :param object2notify: MainTimer object
        :type object2notify: MainTimer
        """
        CommonListener.__init__(self, object2notify)
        PyMouseEvent.__init__(self)
示例#3
0
 def __init__(self, lgtv):
     PyMouseEvent.__init__(self)
     self.lgtv = lgtv
     self.x = 0
     self.y = 0
     self.refresh_rate = 2 #bigger = slower
     self.sensitivity = 1 #bigger = higher
     self.count = 0
示例#4
0
 def __init__(self, clicksPerSecond = 5, randomizeRange = 0, toggleClick = False, holdClick = True, keyToUse = "Shift_L"):
     PyMouseEvent.__init__(self)
     self.isClicking = False
     if clicksPerSecond > 0:
         self.clicksPerSecond = clicksPerSecond
     else:
         raise ValueError("Clicks per second must be greater than 0.")
     if randomizeRange >= 0:
         self.randomizeRange = randomizeRange
     else:
         raise ValueError("Random range must be greater than or equal to 0.")
     self.mouse = PyMouse()
     self.toggleClick = toggleClick
     self.holdClick = holdClick
     self.keyToUse = keyToUse
     self.initHookManager()
示例#5
0
文件: snap.py 项目: sme3863/snapPy
	def __init__(self,max_width,max_height,wm_width=2,wm_height=44,clickable_offset=23, margin=10):
		PyMouseEvent.__init__(self)
		
		#get these programmatically
		self.WM_WIDTH = int(wm_width) ##WM side of window width in pixels
		self.WM_HEIGHT = int(wm_height) #WM top of window height in pixels
		self.CLICKABLE_OFFSET = int(clickable_offset) #number of pixels on the WM window that are not moving the window when clicked
		self.MARGIN = int(margin) #dictates when snapping occures
		#self.WM_BOTTOM_HEIGHT = 4 #number of pixels at the bottom of each window
		#self.TASKBAR_HEIGHT = 30 #height of the taskbar in pixels, atm only taskbars at the bottom are considered 
		###########################################

		self.MAX_WINDOW_WIDTH = int(max_width)
		self.MAX_WINDOW_HEIGHT = int(max_height)
		

		self.mouse = PyMouse()
		screen_size = self.mouse.screen_size()
		self.screen_width = screen_size[0]
		self.screen_height = screen_size[1]
		self.counter = COUNTER 
		self.original_window_sizes = {} #info used to restore windows when 'unsnapping' them
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.top_left = []
     self.bottom_right = []
示例#7
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.mouse = PyMouse()
     self.first = True
 def __init__(self,wLocation):
     PyMouseEvent.__init__(self)
     self._startTime = time.time()
     self._lastEventTime = self._startTime
     self._writeLocation = wLocation
     self._coordinateList = []
 def __init__(self, io_obj):
     self._io_obj = io_obj
     PyMouseEvent.__init__(self)
 def __init__(self):
     PyMouseEvent.__init__(self)
示例#11
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.x_click_down = -1
     self.y_click_down = -1
     self.x_click_up = -1
     self.y_click_up = -1
示例#12
0
 def __init__(self, image):
     PyMouseEvent.__init__(self)
     self.prev = PyMouse().position()
     self.lastStop = time.time()
     self.BLACK = (0, 0, 0, 255)
     self.image = image
 def __init__(self):
     PyMouseEvent.__init__(self)
     print "hello!"
     self.state = self.NOT_CLICKED
示例#14
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.coords = MouseCoords()
示例#15
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.mouse_clicks = []
示例#16
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.top_left = False
     self.bottom_right = False
     print("Click the top left corner of the area to draw in..")
示例#17
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.x = None
     self.y = None
示例#18
0
 def __init__(self, capture=False):
     PyMouseEvent.__init__(self, capture=capture)
     self.mclicked = 0
     self.MyMouse = None
     if capture:  #if capture .. make mouse stay at same place
         self.MyMouse = PyMouse()
示例#19
0
 def __init__(self):
     print("Started Capturing Cursor...")
     PyMouseEvent.__init__(self)
示例#20
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.print_message()
示例#21
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.fibo = fibo()
示例#22
0
文件: record.py 项目: JDongian/auter
 def __init__(self):
     self.state = 1
     PyMouseEvent.__init__(self)
示例#23
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.s_x = 0
     self.s_y = 0
     self.mouse = PyMouse()
示例#24
0
	def __init__(self):
		PyMouseEvent.__init__(self)

		os.system('~/Documents/scripts/general/sh/shift.sh 1 2')
		self.current_desktop = self.get_current_desktop()
		self.update_windows()
示例#25
0
	def __init__(self):
		PyMouseEvent.__init__(self)
		self.events = []
		self.stop_trigger = None
示例#26
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.mouse = PyMouse()
     self.first = True
示例#27
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.x, self.y = None, None
示例#28
0
    def __init__(self):
        PyMouseEvent.__init__(self)

        # list of listener functions
        self.moveListeners = []
示例#29
0
 def reset(self):
     PyMouseEvent.__init__(self, capture=False, capture_move=False)
     self.m = PyMouse()
     self.timer = Timer()
     self.moves = []
     self.stopped = False
示例#30
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.phase = 0
     print "The bot needs to know where the game board is."
     print "Please mark it by pressing LMB somewhere inside game board border's *upper left corner*."
示例#31
0
	def __init__(self):
		PyMouseEvent.__init__(self)
示例#32
0
 def __init__(self):
     PyMouseEvent.__init__(self, capture=True)
     self.curSong = 0
     self.numSongs = 4
     self.songs = ["CHAIR", "TEDDYBEAR", "BICYCLE", "DOOR"]
示例#33
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.fibo = fibo()
示例#34
0
 def __init__(self):
     PyMouseEvent.__init__(self)
     self.history = []