GUI Automation Functionality for Crystal by linking with X11 C bindings.
-
Add the dependency to your
shard.yml
:dependencies: crystal-autogui: github: hrichharms/crystal-autogui
-
Run
shards install
Since crystal doesn't have native bindings to the required header files, crystal-autogui requires linked C code. In order to link the X11 api-interacting C code with the crystal code, the c source file must be compiled to object files as follows:
screen.c -> screen.o
gcc -c screen.c -o screen.o -lX11
mouse.c -> mouse.o
gcc -c mouse.c -o mouse.o -lX11 -lXtst
keyboard.c -> keyboard.o
gcc -c keyboard.c -o keyboard.o -lX11 -lXtst
- Fork it (https://github.com/your-github-user/crystal-autogui/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
- Automatic string writing
- Character to Key-code mapping for easier keyboard function use
- Mouse scrolling
- Pixel checking