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

Broaden allowed syntax for DSL #31

Closed emiln closed 8 years ago

emiln commented 8 years ago

Until now a command must start with a keyword. This has been relaxed and a command can now start with a keyword, a symbol, or a string.

This means that all of the following are legal ways to represent a click:

[click] [:click] ["click"] (click) (:click) ("click")

This closes #30.

emiln commented 8 years ago

Since rudimentary error handling is being introduced anyway, it'd be nice to print a list of legal commands if an illegal one is encountered. All of these can be formatted into a nice string like so:

(->> process-event
  (.getMethodTable)
  (map first)
  (remove (partial = :default))
  (sort)
  (clojure.string/join ", "))