mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-07-04 15:23:06 +02:00
750 B
750 B
robotgo_demo
A simple demo of go-vgo/robotgo — desktop automation for Go (mouse, keyboard, screen, clipboard, window management).
Requirements (Arch Linux, X11)
sudo pacman -S --needed gcc go libxtst libx11 libxkbcommon libxkbcommon-x11 \
libpng xsel xclip libxcb
Build & Run
cd robotgo_demo
go build -o robotgo_demo .
./robotgo_demo
Note: The program types text after a 2-second delay — focus a text editor before running.
What it does
- Prints screen resolution
- Reads and moves the mouse to screen center
- Reads the pixel color at center
- Writes/reads the clipboard
- Types "Hello World!" into the focused window
- Prints the active window title