From natural command to backend call
The runtime stays readable on top by moving complexity into resolvers and dispatchers underneath.
AppleScript had 40 years. Windows had nothing. Until now. WinScript-lang gives Windows automation a natural, structured language designed for humans and AI agents.
WinScript is a pipeline, a language surface, and an agent interface all at once. This reference explains the runtime path and the primitives that make that possible.
A Lark PEG grammar parses `tell/end tell` blocks and natural-syntax instructions.
The grammar gives WinScript a readable surface while still preserving enough structure for deterministic parsing.
Parsed source is transformed into explicit dataclass-style nodes.
The AST normalizes human-friendly syntax into a machine-friendly representation the runtime can reason about.
Natural commands are matched to `.wsdict` definitions.
This is where community dictionaries become executable capability maps instead of ad hoc prompt instructions.
Resolved actions are routed to the correct backend.
A single script can stay high-level while the dispatcher decides which adapter should fulfill each command.
CDP is active today, with COM and UIA on the roadmap.
Chrome and Electron apps are ready now; Office and native Win32 support expand the same model across Windows.
The project already has meaningful test coverage and performance targets that point toward a serious runtime.
Execute source provided inline.
Best for agents or UIs that assemble scripts dynamically at runtime.
Execute a script stored on disk.
Keeps larger workflows versionable and easier to reuse across teams.
Discover installed or known `.wsdict` targets.
Lets an agent inspect the current capability surface before choosing a path.
Inspect the command vocabulary for one application.
Turns each supported app into a queryable interface instead of a hidden implementation detail.
Parse-check a script without running it.
Ideal for editor integrations, agent planning, and safe preflight validation.
tell application "VS Code"
set project_name to "win-lang-site"
open folder "C:/projects/" & project_name
wait 1 second
return "workspace_ready"
end tellapp: Chrome
backend: cdp
commands:
open:
mapsTo: CDP.Page.navigate
args:
url: string
click button:
mapsTo: CDP.DOM.click
target:
role: buttonValidation, app discovery, command introspection, and execution are exposed through MCP.
CDP is live for Chrome and Electron apps, with COM and UIA expanding the same mental model across Windows.
The runtime stays readable on top by moving complexity into resolvers and dispatchers underneath.