wxw is a collection of tools for the windows and mac operating systems.
It can be used from the command line or as a node module.
npm install -g wxw
wxw help
wxw [command] [args...]
commands:
info [wid]
raise wid
minimize wid
maximize wid
restore wid
focus wid
close wid
quit wid
bounds wid [x y w h]
move wid x y
size wid w h
launch path
handle [pid|path]
proc [pid|file]
terminate [pid|file]
mouse
key [[alt+|ctrl+|shift+]key [down|up]]
help command
folder name
trash count|empty|file
taskbar hide|show|toggle
screen [size|user]
screenshot [targetfile]
icon path [targetfile]
wid:
id, pid, path, or nickname
nickname:
normal|maximized|minimized
top|front|foreground
taskbar
wxw = require('wxw'); # a thin wrapper around the executable
console.log wxw('info', 'top')
# [
# {
# path: 'C:/msys64/usr/bin/mintty.exe',
# title: '/c/Users/kodi/s/wxw',
# pid: 12384,
# id: '8f04c6', ◂◂◂ use this to control a single window
# x: 15,
# y: 314,
# width: 1302,
# height: 1530,
# index: 40,
# status: 'normal'
# }
# ]
wxw('minimize', '8f04c6')
wxw('launch', 'firefox')
wxw('restore', 'minimized')
wxw('move', 'top', 0, 0)
wxw('size', 'top', 1000, 1000)
wxw('bounds', 'top', 0, 0, 1000, 1000)
wxw('screenshot', 'myscreen.png')
wxw('trash', './crap.txt')
if (wxw('trash', 'count'))
wxw('trash', 'empty')