Fast Bookmark에 대한 리뷰
Fast Bookmark 제작자: rxliuli
Firefox 사용자 19240815 님의 리뷰
5점 만점에 5점
Firefox 사용자 19240815 님, 2달 전Surprisingly good.
import os
import subprocess
import time
# Target click coordinates
folder_x, folder_y = 1821, 65
search_x, search_y = 1661, 169
# Get current cursor position
result = subprocess.run(["xdotool", "getmouselocation", "--shell"], capture_output=True, text=True)
lines = result.stdout.splitlines()
orig_x = int([l for l in lines if l.startswith("X=")][0].split("=")[1])
orig_y = int([l for l in lines if l.startswith("Y=")][0].split("=")[1])
# Click folder
os.system(f"xdotool mousemove --sync {folder_x} {folder_y}")
os.system("xdotool mousedown 1")
time.sleep(0.05) # hold for 1/4 second
os.system("xdotool mouseup 1")
# Wait for popup to process click
time.sleep(0.25) # keep 0.2s to ensure focus
# Click search bar
os.system(f"xdotool mousemove --sync {search_x} {search_y}")
os.system("xdotool mousedown 1")
os.system("xdotool mouseup 1")
# Minimal pause before restoring cursor
time.sleep(0.05)
# Restore original cursor position
os.system(f"xdotool mousemove --sync {orig_x} {orig_y}")
This can be used for AutoKey.
import os
import subprocess
import time
# Target click coordinates
folder_x, folder_y = 1821, 65
search_x, search_y = 1661, 169
# Get current cursor position
result = subprocess.run(["xdotool", "getmouselocation", "--shell"], capture_output=True, text=True)
lines = result.stdout.splitlines()
orig_x = int([l for l in lines if l.startswith("X=")][0].split("=")[1])
orig_y = int([l for l in lines if l.startswith("Y=")][0].split("=")[1])
# Click folder
os.system(f"xdotool mousemove --sync {folder_x} {folder_y}")
os.system("xdotool mousedown 1")
time.sleep(0.05) # hold for 1/4 second
os.system("xdotool mouseup 1")
# Wait for popup to process click
time.sleep(0.25) # keep 0.2s to ensure focus
# Click search bar
os.system(f"xdotool mousemove --sync {search_x} {search_y}")
os.system("xdotool mousedown 1")
os.system("xdotool mouseup 1")
# Minimal pause before restoring cursor
time.sleep(0.05)
# Restore original cursor position
os.system(f"xdotool mousemove --sync {orig_x} {orig_y}")
This can be used for AutoKey.
리뷰 1개
리뷰가 없습니다