Skip to content

miere43/autome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Dumb GUI automation library for Nim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages