Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khchen/wAuto
Windows automation module
https://github.com/khchen/wAuto
Last synced: 21 days ago
JSON representation
Windows automation module
- Host: GitHub
- URL: https://github.com/khchen/wAuto
- Owner: khchen
- License: mit
- Created: 2020-04-23T00:40:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-16T15:00:32.000Z (over 1 year ago)
- Last Synced: 2024-08-05T17:31:55.826Z (4 months ago)
- Language: Nim
- Homepage:
- Size: 155 KB
- Stars: 54
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
- awesome-hacking-lists - khchen/wAuto - Windows automation module (Nim)
README
# wAuto
wAuto is the Windows automation module for nim based on
[winim](https://github.com/khchen/winim) and
[wNim](https://github.com/khchen/wNim). It contains support to simulate
keystrokes and mouse movements, manipulate windows, processes, and registry.
Some functions are inspired by [AutoIt Script](https://www.autoitscript.com)## Install
With git on windows:nimble install wAuto
Without git:
1. Download and unzip this moudle (by click "Clone or download" button).
2. Start a console, change current dir to the folder which include "wAuto.nimble" file.
(for example: C:\wAuto-master\wAuto-master>)
3. Run "nimble install"## Example
```nim
import wAuto# Open "Run" box
send("#r")# Start notepad.exe
send("notepad{enter}")# Wait the window
let notepad = waitAny(window.className == "Notepad" and window.isActive)# Send some words
send("Hello, world")# Drag the mouse cursor to select
clickDrag(pos1=notepad.clientPosition(0, 0), pos2=notepad.clientPosition(200, 0))# Copy it
send("^c")# Paste 10 times slowly
opt("SendKeyDelay", 250)
send("^{v 10}")# Terminates the process
kill(notepad.process)
```## Docs
* https://khchen.github.io/wAuto## License
Read license.txt for more details.Copyright (c) Chen Kai-Hung, Ward. All rights reserved.
## Donate
If this project help you reduce time to develop, you can give me a cup of coffee :)[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://paypal.me/khchen0915?country.x=TW&locale.x=zh_TW)