MCPcopy Create free account
hub / github.com/e2b-dev/desktop / move_around

Function move_around

examples/basic-python/main.py:14–23  ·  view source on GitHub ↗
(desktop, width, height)

Source from the content-addressed store, hash-verified

12window_frame_height = 29 # Additional px to take into the account the window border at the top
13
14def move_around(desktop, width, height):
15 for i in range(5):
16 x = random.randint(0, width)
17 y = random.randint(0, height)
18 desktop.move_mouse(x, y)
19 print(" - Moved mouse to", x, y)
20 desktop.right_click()
21 print(" - Right clicked", i)
22 print(" - Waiting 2 seconds...\n")
23 time.sleep(2)
24
25def create_window(stream_url, width, height, command_queue):
26 # We create a separate thread to check the queue for the 'close' command that can be sent from the main thread.

Callers 1

mainFunction · 0.85

Calls 2

move_mouseMethod · 0.80
right_clickMethod · 0.80

Tested by

no test coverage detected