emiln / cljck

An OS-agnostic Clojure library for automating keyboard and mouse actions.
GNU General Public License v3.0
5 stars 0 forks source link

Add `with-game-borders` command #39

Open emiln opened 8 years ago

emiln commented 8 years ago

The idea is that it'd be nice to tell Cljck about the border of the game window, which would enable relative positions rather than absolute positions. In this fashion people playing the same game on different monitors could share their scripts without having to translate all the coordinates.

I imagine something along the lines of:

(with-game-borders
  (move-to 10% 10%)
  (click))

This should make Cljck prompt the user to click the lower left and then upper right corner of the game window to log the coordinates. Any attempt to use relative coordinates outside of with-game-borders should be an error.