Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

mac-control

bởi easonc13

Browser & Automation
598Lượt tải do clawskills.sh công bố
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Control Mac via mouse/keyboard automation using cliclick and AppleScript.

Mô tả

Kỹ năng này làm gì

Automates Mac UI interactions using cliclick for mouse and keyboard input, screencapture for screenshots, and AppleScript for window information. Handles coordinate scaling on Retina displays and provides patterns for clicking buttons, typing text, and navigating dialogs. Includes fallback keyboard navigation for pages that block synthetic mouse events.

Combining cliclick with AppleScript window queries lets automation find element positions dynamically rather than relying on hardcoded coordinates that break when layouts change.

Khi nào nên dùng

  • Clicking Chrome extension toolbar buttons by screen coordinates
  • Automating dialog dismissal without manual mouse interaction
  • Taking and analyzing screenshots to locate UI elements before clicking
  • Typing text into focused fields as part of a scripted workflow
  • Navigating Google OAuth pages using Tab and Enter instead of mouse clicks

Quy trình ví dụ

ĐẦU VÀO

User asks: click the OK button in the dialog on screen

AGENT
  1. 1

    Take screenshot with screencapture -x /tmp/screen.png

  2. 2

    Read the screenshot to locate the OK button coordinates

  3. 3

    Click at those coordinates using cliclick c:X,Y

  4. 4

    Take a follow-up screenshot to verify the dialog was dismissed

ĐẦU RA

Dialog is dismissed and confirmation screenshot shows the updated screen state

Yêu cầu

  • cliclick installed at /opt/homebrew/bin/cliclick
  • ImageMagick (magick) installed for color-based element detection
  • Accessibility permissions granted to the terminal or Node.js process in System Settings

Cài đặt

clawhub install easonc13/mac-control

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết