@@ -64,26 +64,26 @@ def execute(self, thd=None):
6464 ny = int (y * 65535 )
6565 win32api .mouse_event (win32con .MOUSEEVENTF_ABSOLUTE | win32con .MOUSEEVENTF_MOVE , nx , ny , 0 , 0 )
6666
67- if self .message == 'mouse left down' :
67+ if self .action_type == 'mouse left down' :
6868 win32api .mouse_event (win32con .MOUSEEVENTF_LEFTDOWN , 0 , 0 , 0 , 0 )
69- elif self .message == 'mouse left up' :
69+ elif self .action_type == 'mouse left up' :
7070 win32api .mouse_event (win32con .MOUSEEVENTF_LEFTUP , 0 , 0 , 0 , 0 )
71- elif self .message == 'mouse right down' :
71+ elif self .action_type == 'mouse right down' :
7272 win32api .mouse_event (win32con .MOUSEEVENTF_RIGHTDOWN , 0 , 0 , 0 , 0 )
73- elif self .message == 'mouse right up' :
73+ elif self .action_type == 'mouse right up' :
7474 win32api .mouse_event (win32con .MOUSEEVENTF_RIGHTUP , 0 , 0 , 0 , 0 )
75- elif self .message == 'mouse middle down' :
75+ elif self .action_type == 'mouse middle down' :
7676 win32api .mouse_event (win32con .MOUSEEVENTF_MIDDLEDOWN , 0 , 0 , 0 , 0 )
77- elif self .message == 'mouse middle up' :
77+ elif self .action_type == 'mouse middle up' :
7878 win32api .mouse_event (win32con .MOUSEEVENTF_MIDDLEUP , 0 , 0 , 0 , 0 )
79- elif self .message == 'mouse wheel up' :
79+ elif self .action_type == 'mouse wheel up' :
8080 win32api .mouse_event (win32con .MOUSEEVENTF_WHEEL , 0 , 0 , win32con .WHEEL_DELTA , 0 )
81- elif self .message == 'mouse wheel down' :
81+ elif self .action_type == 'mouse wheel down' :
8282 win32api .mouse_event (win32con .MOUSEEVENTF_WHEEL , 0 , 0 , - win32con .WHEEL_DELTA , 0 )
83- elif self .message == 'mouse move' :
83+ elif self .action_type == 'mouse move' :
8484 pass
8585 else :
86- logger .warning ('Unknown mouse event:%s' % self .message )
86+ logger .warning ('Unknown mouse event:%s' % self .action_type )
8787
8888 elif self .event_type == 'EK' :
8989 key_code , key_name , extended = self .action
@@ -100,16 +100,16 @@ def execute(self, thd=None):
100100 if extended :
101101 base = win32con .KEYEVENTF_EXTENDEDKEY
102102
103- if self .message == 'key down' :
103+ if self .action_type == 'key down' :
104104 win32api .keybd_event (key_code , 0 , base , 0 )
105- elif self .message == 'key up' :
105+ elif self .action_type == 'key up' :
106106 win32api .keybd_event (key_code , 0 , base | win32con .KEYEVENTF_KEYUP , 0 )
107107 else :
108- logger .warning ('Unknown keyboard event:' , self .message )
108+ logger .warning ('Unknown keyboard event:' , self .action_type )
109109
110110 elif self .event_type == 'EX' :
111111
112- if self .message == 'input' :
112+ if self .action_type == 'input' :
113113 text = self .action
114114 pyperclip .copy (text )
115115 # Ctrl+V
@@ -118,4 +118,4 @@ def execute(self, thd=None):
118118 win32api .keybd_event (86 , 0 , win32con .KEYEVENTF_KEYUP , 0 )
119119 win32api .keybd_event (162 , 0 , win32con .KEYEVENTF_KEYUP , 0 )
120120 else :
121- logger .warning ('Unknown extra event:%s' % self .message )
121+ logger .warning ('Unknown extra event:%s' % self .action_type )
0 commit comments