Fix premature cursor movement in click_client_pos to ensure reliable click registration
This commit is contained in:
@ -232,9 +232,6 @@ class DirtyLeagueBot:
|
|||||||
user32.mouse_event(0x0002, 0, 0, 0, 0) # MOUSEEVENTF_LEFTDOWN
|
user32.mouse_event(0x0002, 0, 0, 0, 0) # MOUSEEVENTF_LEFTDOWN
|
||||||
time.sleep(0.08)
|
time.sleep(0.08)
|
||||||
user32.mouse_event(0x0004, 0, 0, 0, 0) # MOUSEEVENTF_LEFTUP
|
user32.mouse_event(0x0004, 0, 0, 0, 0) # MOUSEEVENTF_LEFTUP
|
||||||
# Briefly park cursor in neutral corner to prevent buttons staying in hover/glow state
|
|
||||||
park_x, park_y = self.wm.client_to_screen(50, 50)
|
|
||||||
user32.SetCursorPos(park_x, park_y)
|
|
||||||
time.sleep(self.action_delay)
|
time.sleep(self.action_delay)
|
||||||
|
|
||||||
def click_client_pos_fast(self, x: int, y: int):
|
def click_client_pos_fast(self, x: int, y: int):
|
||||||
|
|||||||
Reference in New Issue
Block a user