中文 | English
Example Scripts
The following examples demonstrate various features of Wingman:
Basic Examples
- Hello World - The simplest example
- Pixel Detection - Detect a specified color on the screen
- Image Matching - Find an image on the screen
- Auto Loop - Continuously monitor and perform actions
- Macro Record - Record and replay operations
UI Automation Example
- UI Automation - Windows control automation interaction
Feature Examples (examples/lua_scripts)
template_batch.lua- Named template registration and batch recognition (templateAdd / templateFindAll)kv_store.lua,color_detect.lua,window_control.lua, etc. - Individual examples for each module; see the directory
Python Examples (examples/python_scripts)
Python and Lua share the same module surface; functions expose both their camelCase original names and snake_case aliases (snake_case is recommended, consistent with the libs/python/typing stubs):
hello.py- KV storage + notifications primertemplate_batch.py- Batch template management (same shape astemplate_batch.lua)workflow_pipeline.py- Workflow orchestration: dependencies, conditional branching, output aggregation (run/when require a thread-safe callable; Lua function bodies are rejected on submission, so the orchestration example is Python-only)events_fsm.py- Event subscription combined with an FSM state machine
Running an Example
bash
wingman-agent.exe script examples/lua_scripts/hello_world.lua