Skip to content

Instantly share code, notes, and snippets.

@dmn001
Last active June 19, 2025 17:27
Show Gist options
  • Save dmn001/36df6f0d663ea3ace214979f0a0e0f5d to your computer and use it in GitHub Desktop.
Save dmn001/36df6f0d663ea3ace214979f0a0e0f5d to your computer and use it in GitHub Desktop.
import subprocess
import pygetwindow as gw
import pyautogui
import time
# Launch colorcpl.exe
subprocess.Popen("colorcpl.exe")
time.sleep(0.5) # Wait for the window to open
# Find the window
win = None
for window in gw.getWindowsWithTitle("Colour Management"):
if window.visible:
win = window
break
if not win:
print("Colour Management window not found.")
exit()
# Bring window to front
win.activate()
# time.sleep(0.2)
# Window coordinates
left, top = win.left, win.top
# Define relative click positions
click_positions = [
(680, 130),
(680, 159), # first dropdown
(495, 387),
(860, 723),
(680, 130),
(680, 185), # second dropdown
(495, 387),
(860, 723),
(977, 878) # Close button
]
# Perform clicks
for rel_x, rel_y in click_positions:
abs_x = left + rel_x
abs_y = top + rel_y
pyautogui.click(abs_x, abs_y)
time.sleep(0.1)
print("All clicks performed.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment