WinScript

β‘ WinScript is a lightweight scripting language for Windows automation.
Inspired by AppleScript, written in Go, and designed to be simple, readable, and powerful.
β¨ Features
- π₯ Launch and control Windows applications
- π― Simulate mouse movement and clicks
- β¨οΈ Simulate keystrokes and text input
- β± Simple
wait and delay functionality
- π Human-readable
.ws syntax
- π§ Cross-compatible CLI with Cobra
- π§© Easy to extend with Go
π Quick Example
open "notepad.exe"
wait 2s
type "Hello from WinScript!"
move_mouse 400 300
click "left"
π Save your scripts as .ws files.
π§ Installation
git clone https://github.com/1strewave/winscript.git
cd winscript
go build -o winscript
β
Optionally, add the built binary folder to your system PATH for global access.
To install the path permanently via script, you can use install.bat.
π» CLI Usage
WinScript provides a command-line interface using Cobra.
πΉ Available Commands:
winscript [file] # Run a script file directly
winscript run script.ws # Explicit 'run' command
winscript help # Show available commands
winscript docs # Show documentation keywords
winscript version # Print current version
πΈ Examples:
winscript hello.ws
winscript run scripts/boot.ws
winscript docs
π§ Language Keywords
| Keyword |
Description |
Example |
open |
Launch an application |
open "notepad.exe" |
type |
Type a string |
type "Hello, world!" |
press |
Press a single key |
press "enter" |
hotkey |
Key combination |
hotkey "ctrl+s" |
move_mouse |
Move mouse cursor |
move_mouse 500 300 |
click |
Mouse click |
click "left" |
wait |
Wait for time |
wait 2s |
log |
Output text to console |
log "Starting script..." |
π More details coming soon in docs/commands.md
π£ Roadmap
- CLI interface with Cobra
- Script parser and interpreter
- Core automation commands
- Variables (
set name = "Alice")
- Conditional logic (
if, else)
- Loops (
repeat, while)
- User-defined functions
- REPL / interactive mode
- RayLib dependency
- GUI interface
- Windows Installer (
.msi)
- WS IDE (for winscript)
π€ Contributing
Pull requests, issues, ideas, and feedback are welcome.
If youβd like to help shape the future of WinScript β letβs build it together!
π§βπ» Author
WinScript is a hobby project created by @1strewave to explore language design and automation on Windows using Go.
Made with β€οΈ for code, simplicity, and creativity.