No description
Find a file
2016-11-18 11:46:48 +03:00
private - Added getPixel(), unpackColor(), desktopSize(), notify() 2016-07-22 20:48:47 +03:00
.editorconfig Prepare for nimble commit 2016-07-20 18:56:12 +03:00
.gitignore - Added restore(), unminimize(), unmaximize(), windowAt(), attach(), detach(), tofront(), tobottom(), focus(), topmost() 2016-07-10 18:45:40 +03:00
autome.nim - Added getPixel(), unpackColor(), desktopSize(), notify() 2016-07-22 20:48:47 +03:00
autome.nimble - Added getPixel(), unpackColor(), desktopSize(), notify() 2016-07-22 20:48:47 +03:00
LICENSE Added somehow working keyboard key emit 2016-07-07 23:26:27 +03:00
README.md Update README to show this package is Windows only 2016-11-18 11:46:48 +03:00

autome

Simple GUI automation tool (Windows only).

Features

  • mouse: get/set cursor pos, emit clicks
  • keyboard: send characters (ASCII only)
  • window: get/set window pos, find, show/hide, activate/deactivate, minimize/maximize/unminimize/unmaximize, focus/unfocus
  • hotkeys: run your code when user presses certain keyboard combination.

Documentation

Docs are not always up-to-date, but still: http://miere.ru/docs/autome/

You can also generate docs yourself with $ nim doc2 autome.

Example

import autome

var wnd = findWindow("Some app")
wnd
  .attach() # attach this thread to window thread, so we can use show()
  .show() # make sure window is in front of other windows
  .detach() # detach this thread
mouse
  .move(400, 400) # select textbox
  .click()
  # press on text box three times so its text got selected
  .emit(mLeft, msDown, msDown, msDown, msUp)
keyboard
  .send("D:/pic.tga") # replace text
mouse
  .move(600, 600) # click submit button
  .click()

TODO

  • close window proc
  • clean up stuff that was leaved after refactoring
  • check out why window.size & window.clientsize procs' report wrong values
  • implement ton of stuff I forgot about