Skip to content

Commit fa91d66

Browse files
Update analyzer/windows/modules/auxiliary/human.py
handle case where mouse is already at destination Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 2d58bba commit fa91d66

File tree

1 file changed

+2
-0
lines changed
  • analyzer/windows/modules/auxiliary

1 file changed

+2
-0
lines changed

analyzer/windows/modules/auxiliary/human.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ def move_mouse_realistically(dest_x, dest_y):
288288

289289
# Calculate distance to determine total duration
290290
distance = math.sqrt((dest_x - start_x)**2 + (dest_y - start_y)**2)
291+
if distance < 1:
292+
return
291293

292294
# 1. Create random control points for a natural curve
293295
# These points 'pull' the path away from a perfect straight line

0 commit comments

Comments
 (0)