VoiceMacro LLM Documentation
Introduction
Note: This documentation is intended exclusively for large language models (LLMs) to learn, generate, and interpret VoiceMacro macros. It is not intended for direct human use. All content, patterns, and examples are structured to maximize LLM understanding and macro generation accuracy.
About VoiceMacro
VoiceMacro is an advanced Speech Recognition enabled Macro Software developed by FSC-SOFT. It's a powerful automation tool that acts like a "Swiss Army Knife" for your PC, allowing you to control your computer, applications, and games through voice commands, keyboard shortcuts, mouse buttons, controllers, and various other triggers.
Current Version Information
- Current Version: 1.4.0.59 (June 11, 2025)
- Developer: FSC-SOFT
- License: Donationware (Free to use, donations appreciated)
- Platform: Windows (Windows 7/8/10/11, Server editions)
- Requirements: .NET Framework 4.6.1
- Website: https://www.voicemacro.net/
- Support: VoiceMacro Community Forum
Core Purpose & Philosophy
VoiceMacro is designed to provide comprehensive automation capabilities with a focus on accessibility and ease of use. It eliminates the need for complex programming while offering powerful features for:
- Voice Control: Control your PC through natural speech commands
- Accessibility: Enable hands-free computer operation for users with disabilities
- Gaming: Create custom voice commands and hotkeys for games
- Productivity: Automate repetitive tasks and workflows
- Entertainment: Control media playback, system functions, and applications
- Integration: Connect with external programs, plugins, and web services
Key Features Overview
- 50+ Actions: Press keys/buttons, move mouse, open files, play sounds, speak text, activate windows, rename windows, auto-play macros on profile activation, and much more
- Advanced Conditions: Wait for pixel, toggle ON/OFF, rotate, rotate end, OnTimeout, loop start/end, and complex conditional logic
- Variable System: 4 types of user variables (local, profile-wide, global, and global saved to disk) plus 60+ fixed internal variables
- Math & Functions: Various math and compare functions plus random number generator
- Auto Profile Switching: Automatically switch profiles based on active windows
- Multiple Triggers: Voice commands, keyboard/mouse buttons, controllers, scheduler, command line, other macros, and plugins
- Advanced UI: Dark mode, stay on top, minimize instead close, informative tray icon
- Recording: Real-time recording of mouse and keyboard actions
- Testing: Step-by-step macro testing and debugging
- Import/Export: Profile sharing and backup capabilities
- Remote Control: HTTP-based remote control for external devices
- Plugin Support: Extensible architecture with vmAPI.dll SDK
- HTML Export: Create web-based control interfaces
Recent Features & Updates
- Dark Mode: Complete dark theme support with customizable interface
- Controller Support: Full gamepad/joystick integration with modifier buttons
- Remote Control: HTTP-based remote control for smartphones and tablets
- Plugin Architecture: Official SDK for C#/VB.net plugin development
- HTML Export: Create custom web interfaces for remote control
- Enhanced UI: Stay on top, minimize instead close, improved tray functionality
- Advanced Variables: Expanded internal variable system with more dynamic options
- Improved Speech Recognition: Better engine integration and training support
Use Cases & Applications
- Gaming: Voice commands for games, controller integration, automated game actions
- Accessibility: Hands-free computer control for users with mobility limitations
- Productivity: Automate repetitive office tasks, file management, and data entry
- Media Control: Voice-controlled media playback, volume control, and entertainment
- System Administration: Automated system maintenance, monitoring, and control
- Development: Automated testing, deployment, and development workflows
- Home Automation: Control smart home devices and IoT systems
- Education: Assistive technology for learning and presentation
Community & Support
- Forum: Active community at VoiceMacro Forum
- Documentation: Comprehensive guides and tutorials
- Sample Profiles: Extensive collection of example macros and profiles
- Plugin Repository: Community-developed plugins and extensions
- Support: Developer and community support for all skill levels
LLM Usage Guidelines
When helping users create VoiceMacro macros, you MUST provide step-by-step UI navigation instructions including:
- Menu Navigation: Tell users exactly which menus to open (e.g., "Click the 'Other' menu, then select 'Window manipulation'")
- Button Clicks: Specify which buttons to click (e.g., "Click the 'Add macro' button" or "Click 'OK' to confirm")
- Window Navigation: Guide users through opening the correct windows (e.g., "Open the Macro Editor by clicking 'Edit' in the main window")
- Form Fields: Explain what to enter in each field (e.g., "In the 'Window Title' field, enter 'Notepad'")
- Hotkey Usage: Mention relevant hotkeys when available (e.g., "You can also press Alt+O to open the Other menu")
- Context Awareness: Make sure users are in the right window/context before giving instructions
Example LLM Response Pattern:
User Request: "Create a macro to open Notepad"
LLM Response: "Here's how to create that macro:
1. In the main VoiceMacro window, click the 'Edit' button (or press Alt+E)
2. In the Profiles & Macros window, click 'Add New macro' (or press Alt+A)
3. In the Macro Editor, click the 'Other' menu (or press Alt+O)
4. Select 'Execute/open a file' from the menu
5. In the dialog that opens, click the '...' button next to 'File to Open'
6. Browse to and select 'notepad.exe', then click 'OK'
7. Back in the dialog, click 'OK' to save the action
8. In the Macro Editor, click 'OK' to save the macro"
Getting Started
- Install VoiceMacro: Download and install from the official website.
- Explore the Interface: Learn about Profiles, Macros, and the Actions Grid.
- Enable Voice Recognition: Set up your microphone and configure the speech engine (e.g., Windows Speech Recognition).
- Use this Documentation: Reference this guide to create, edit, and troubleshoot macros, or to generate macros via LLM prompts.
Prompt: "Create a macro to open Notepad and type 'Hello'"
Macro: [Profile: Default]
Action 1: WindowToFront "Notepad"
Action 2: InsertText "Hello"
Getting Started for Complete Beginners
This section is specifically designed for total newbies who have never used VoiceMacro before. Follow these steps in order to get up and running quickly.
First Launch Experience
When you run VoiceMacro for the first time:
- Demo Profile Import: VoiceMacro will ask if you want to import the "VoiceMacro demo profile" - SAY YES! This contains a collection of documented sample macros that demonstrate VoiceMacro's capabilities.
- Demo Profile Contents: The demo profile includes macros like "ActivatedBy" and many others that show different features. Edit these macros and click the "Test" button to see how each sample works.
- Sample Profiles: In the "Sample-Profiles" folder, you'll find even more profiles to import for learning.
- Tooltips: VoiceMacro uses extensive tooltips - hover your mouse on any button or object to see helpful hints!
Essential Speech Recognition Setup
CRITICAL: Before using voice commands, you MUST train the Speech Recognition Engine!
- Engine: VoiceMacro uses Microsoft's built-in Windows Speech Recognition Engine (SAPI5) or any other SAPI5-compatible engine you have installed.
- Training: Train the Speech Recognition Engine several times (more is better) with your voice before using voice commands.
- Training Link: How to set up and train Speech Recognition in Windows
- Microphone Setup: VoiceMacro uses the microphone set as "Default Device" in Windows Audio Recording Settings. If you have multiple microphones, define which one to use as default.
- Volume Check: Check VoiceMacro's main window bottom-left corner for the green Input Volume Meter to ensure microphone input isn't too low when speaking.
Speech Recognition Best Practices
- Quality Factors: Microphone quality, position, training, speaking clearly (like a news reporter), and background noise.
- Command Length: AVOID very short one-word commands like "Ok", "Go", "Boost", "Pick" - these cause unwanted executions and poor recognition.
- Better Commands: Use longer commands: "Confirm" instead of "Ok", "Boost the Engine" instead of "Boost", "Pickup stuff" instead of "Pick".
- Speaking Tips: Make a short pause (about 1 second) before speaking any command. Don't correct yourself if you misspeak - just repeat clearly.
- Recognition Improves: Speech recognition works better over time with continued use.
Understanding Profiles and Auto Profile Switching
VoiceMacro's data structure: Profiles > Macros > Actions
- Profiles: Containers for related macros (e.g., "Gaming", "Work", "Desktop").
- Auto Profile Switching: When enabled, VoiceMacro automatically switches profiles based on the currently active window.
- Target Window: Set a target window name for each profile so VoiceMacro knows which profile to activate automatically.
- Default Profile: Use "Toggle Default" to set one profile as default - activated when no other profile matches.
- Global Profile: Use "Toggle Global" to set one profile that's always active regardless of the selected profile.
- Desktop Profile: Create a "Desktop" profile using "[Program Manager (Desktop)]" as target window.
Creating Your First Macro: Step-by-Step Walkthrough
Follow these exact steps to create your first macro:
- Open VoiceMacro: Double-click VoiceMacro.exe to run it.
- Access Profiles: In the main window, click "Edit..." (or press Alt+E) to open the Profiles and macros window.
- Create Profile: Click "Add" to open the Add New Profile window.
- Profile Setup:
- Enter a profile name (e.g., "My First Profile")
- Set Target window (optional - for auto-switching)
- Click "OK" to save the profile
- Add Macro: In the Profiles window, click "Add new" (or press Alt+A) to open the Edit macro window.
- Macro Setup:
- Enter the macro name (this becomes your first voice command)
- For multiple voice commands, separate with semicolon ";"
- Check "Voice Command" to enable voice activation
- Optionally add hotkeys, controller buttons, or scheduler
- Add Actions: Click "Keyboard", "Mouse", or "Pause" buttons, or use "Other..." menu for more actions.
- Save: Click "OK" to save your macro and profile.
- Test: Use the "Test" button to test your macro immediately.
Essential UI Navigation for Beginners
- Main Window: Shows current profile, status indicators, and log of activities.
- Profiles & Macros Window: Manage all profiles and macros. Use context menu (right-click) for more functions.
- Macro Editor: Add and configure actions for your macro.
- Hotkeys: Press Alt key to reveal shortcuts on menus and buttons.
- Context Menus: Right-click in grids for additional options.
- Search: Press Ctrl+F to open search bar in grids.
Beginner-Friendly Macro Examples
Example 1: Simple Text-to-Speech
Voice Command: "What time is it"
Actions:
Action 1: SpeakText "The time is {Time}"
UI Steps: Add macro → Check "Voice Command" → Click "Other" → "Speak text" → Enter "The time is {Time}" → OK
Example 2: Open Notepad
Voice Command: "Open notepad"
Actions:
Action 1: Open "notepad.exe"
UI Steps: Add macro → Check "Voice Command" → Click "Other" → "Execute/open a file" → Browse to notepad.exe → OK
Example 3: System Volume Control
Voice Command: "Mute system"
Actions:
Action 1: Key: Volume Mute
UI Steps: Add macro → Check "Voice Command" → Click "Keyboard" → Press Volume Mute key → OK
Common Beginner Mistakes to Avoid
- Not Training Speech Recognition: Always train the speech engine before using voice commands.
- Short Voice Commands: Avoid one-word commands - use longer, more descriptive phrases.
- Forgetting to Save: Always save your profiles after making changes.
- No Pauses: Add pauses after launching applications to ensure they're ready for input.
- Wrong Window Titles: Use exact window titles or wildcards (*, ?) for window actions.
- Not Testing: Always use the "Test" button to verify your macros work before relying on them.
Next Steps for Beginners
- Explore the Demo Profile: Study and modify the sample macros to understand different features.
- Import Sample Profiles: Check the "Sample-Profiles" folder for additional examples.
- Join the Community: Visit the VoiceMacro Forum for help, tips, and advanced examples.
- Practice: Create simple macros first, then gradually add complexity.
- Backup: Regularly backup your VoiceMacroData.xml file to avoid losing your macros.
LLM Guidance for Beginner Questions
When helping complete beginners, always provide:
- Step-by-step UI navigation with specific button clicks and menu selections
- Voice command recommendations (longer, descriptive phrases)
- Speech recognition setup reminders (training, microphone setup)
- Profile organization advice (target windows, default/global profiles)
- Testing instructions (use Test button, verify functionality)
- Troubleshooting tips (add pauses, check window titles, run as admin if needed)
This section describes each VoiceMacro ActionForm (UI window) so LLMs can guide users step-by-step through macro creation. For each form: purpose, how to open, UI layout, required inputs, and LLM guidance are provided.
Keyboard
- Purpose: Configure a keyboard action (simulate key press, key down, key up, with modifiers).
- How to Open: In the macro editor, add or edit a Key action.
- UI Layout: Key selection button ("Please press a key"), modifier checkboxes (LAlt, LCTRL, LShift, LWin, RAlt, RCTRL, RShift, RWin), radio buttons for action type (Click, KeyDown, KeyUp), numeric input for click duration, OK/Cancel buttons.
- Required Inputs: Key, modifiers, action type.
- LLM Guidance: Instruct the user to click the key selection button and press the desired key, select modifiers, choose action type, and set duration if needed. Confirm with OK.
- Hotkeys: Standard dialog navigation (Enter/OK, Esc/Cancel, Tab navigation).
Mouse
- Purpose: Configure a mouse action (move, click, scroll, etc.).
- How to Open: In the macro editor, add or edit a Mouse action.
- UI Layout: Checkboxes for move, click, scroll, return pointer, relative/absolute position; X/Y coordinate fields; corner/relative position dropdown; click type radio buttons (Click, Down, Up); numeric inputs for click count, delay, scroll distance; OK/Cancel buttons.
- Required Inputs: Action type, coordinates, click/scroll options.
- LLM Guidance: Instruct the user to enter coordinates, select action type, and configure options as needed. Use the "Get Coords" button to capture mouse position. Confirm with OK.
- Hotkeys: Standard dialog navigation (Enter/OK, Esc/Cancel, Tab navigation).
SetVariable
- Purpose: Set or update a variable.
- How to Open: In the macro editor, add or edit a SetVariable action.
- UI Layout: Variable name dropdown/input, value input (supports placeholders, functions), OK/Cancel buttons.
- Required Inputs: Variable name, value.
- LLM Guidance: Instruct the user to select or enter a variable name, enter the value or function, and confirm with OK.
ShowOSD
- Purpose: Configure an On-Screen Display (OSD) action.
- How to Open: In the macro editor, add or edit a ShowOSD action.
- UI Layout: OSD name dropdown, text elements (add/edit/remove), font/color/alignment controls, position (preset radio buttons or manual X/Y), transparency, display time, OK/Cancel buttons.
- Required Inputs: OSD name, text, position, display options.
- LLM Guidance: Instruct the user to select OSD name, add/edit text, set position and display options, and confirm with OK.
Pause
- Purpose: Add a pause (delay) to the macro.
- How to Open: In the macro editor, add or edit a Pause action.
- UI Layout: Numeric input for pause duration (seconds), preset buttons for common durations, OK/Cancel buttons.
- Required Inputs: Pause duration.
- LLM Guidance: Instruct the user to enter or select the desired pause duration and confirm with OK.
PlaySound
- Purpose: Configure a Play Sound action to play an audio file with options for volume, device, sync, and playback range.
- How to Open: In the macro editor, add or edit a PlaySound action.
- UI Layout:
- Audio File input (multi-line, supports multiple files separated by ";" for random playback)
- Browse button ("...") to select audio files
- Test button to play/stop the selected audio file
- Volume input (0-100, default 70)
- Synchronous checkbox (wait for sound to finish before continuing macro)
- Start (ms) and End (ms) inputs for playback range
- Sound Device input (number, 0 or empty = default device)
- Status bar showing playback time (current/total ms)
- OK/Cancel buttons
- Required Inputs: Audio file path(s). Optional: volume, sync, start/end, device.
- LLM Guidance: Instruct the user to enter or browse for the audio file(s), set volume and device if needed, choose sync and playback range, and use Test to preview. Confirm with OK.
SendVirtualKeys
- Purpose: Configure a Send Virtual Keys action to send key codes (virtual keys) to the system or a specific window, with timing and targeting options.
- How to Open: In the macro editor, add or edit a SendVirtualKeys action.
- UI Layout:
- Key Codes input (multi-line, use ";" to separate multiple key codes)
- Help link (opens documentation for key codes)
- Default timings group:
- Click duration (ms, numeric input)
- Pause between clicks (ms, numeric input)
- Send to another window (checkbox, enables targeting options)
- Target window label and combo box (supports wildcards, lists open windows)
- OK/Cancel buttons
- Required Inputs: Key codes. Optional: timings, target window.
- LLM Guidance: Instruct the user to enter the desired key codes, adjust timings if needed, and enable/choose a target window if sending keys to a specific application. Use the Help link for key code reference. Confirm with OK.
SendToPlugin
- Purpose: Configure a Send to Plugin action to send arguments to a selected plugin, with optional synchronous execution.
- How to Open: In the macro editor, add or edit a SendToPlugin action.
- UI Layout:
- Select Plugin dropdown (lists available plugins)
- Plugin description box (shows details for selected plugin)
- Argument 1, 2, 3 inputs (multi-line, support placeholders and variables)
- Synchronous checkbox (wait for plugin to finish before continuing macro)
- OK/Cancel buttons
- Required Inputs: Plugin selection. Optional: arguments, synchronous execution.
- LLM Guidance: Instruct the user to select a plugin, review its description, enter up to three arguments as needed, and choose whether to wait for the plugin to finish. Confirm with OK.
GetKeyState
- Purpose: Configure a Get Key State action to check the state of a key (or toggle key), optionally wait for a keypress, and store the result in a variable.
- How to Open: In the macro editor, add or edit a GetKeyState action.
- UI Layout:
- Get toggle state checkbox (enables toggle key mode for CapsLock, NumLock, ScrollLock, Insert)
- Select Key dropdown (lists all keys or only toggle keys)
- Select or enter variable name (with suffixes for scope: _g, _p, _l, _s)
- Wait for keypress/toggle checkbox
- Timeout (seconds, numeric input, only if waiting for key)
- Radio buttons: down/on or up/off (value stored in variable)
- Info label: explains variable values (1 = down/on, 0 = up/off)
- OK/Cancel buttons
- Required Inputs: Key selection, variable name. Optional: toggle mode, wait for key, timeout, value mode.
- LLM Guidance: Instruct the user to select the key, enter/select a variable name, choose toggle/wait/timeout options as needed, and confirm with OK. Explain variable value meanings for macro logic.
WindowToFront
- Purpose: Configure a Find Window and Activate action to bring a specified window to the foreground by title (supports wildcards and multiple windows).
- How to Open: In the macro editor, add or edit a WindowToFront action.
- UI Layout:
- Target window combo box (lists open windows, supports wildcards *, ?, and semicolon for multiple windows)
- Test button (tries to activate the selected window)
- Info label: explains wildcards and multiple window syntax
- Info label: describes use of variable "SetWinExeName" for process name filtering
- OK/Cancel buttons
- Required Inputs: Target window title or pattern.
- LLM Guidance: Instruct the user to select or enter the window title (using wildcards or multiple titles as needed), optionally set the SetWinExeName variable for process filtering, and use Test to verify. Confirm with OK.
WaitWindow
- Purpose: Configure a Wait for Window action to pause macro execution until a specified window appears or is activated, with optional timeout and abort.
- How to Open: In the macro editor, add or edit a WaitWindow action.
- UI Layout:
- Target window combo box (lists open windows, supports wildcards *, ?)
- Test button (tries to activate the selected window)
- Timeout checkbox and numeric input (seconds, enables abort on timeout)
- Info label: describes use of variable "SetWinExeName" for process name filtering
- OK/Cancel buttons
- Required Inputs: Target window title or pattern. Optional: timeout, abort on timeout.
- LLM Guidance: Instruct the user to select or enter the window title (using wildcards as needed), set timeout/abort options if required, and use Test to verify. Optionally set the SetWinExeName variable for process filtering. Confirm with OK.
ResizeMoveWin
- Purpose: Configure a Resize/Move Window action to resize and/or move a specified window by title, with support for wildcards and variables.
- How to Open: In the macro editor, add or edit a ResizeMoveWin action.
- UI Layout:
- Target window combo box (lists open windows, supports wildcards *, ?)
- Checkboxes: Resize, Move
- Width/Height inputs (for Resize)
- X/Y inputs (for Move)
- Test button (applies resize/move to selected window)
- OK/Cancel buttons
- Required Inputs: Target window, and at least one of Resize or Move with corresponding values.
- LLM Guidance: Instruct the user to select or enter the window title, check Resize and/or Move, enter the desired dimensions/coordinates, and use Test to preview. Confirm with OK.
Close window
- Purpose: Configure a Close Window action to close a specified window by title, with support for wildcards and variables.
- How to Open: In the macro editor, add or edit a Close window action.
- UI Layout:
- Target window combo box (lists open windows, supports wildcards *, ?)
- Test button (closes the selected window)
- Info label: explains wildcards and process name filtering (SetWinExeName variable)
- OK/Cancel buttons
- Required Inputs: Target window title or pattern.
- LLM Guidance: Instruct the user to select or enter the window title (using wildcards as needed), optionally set the SetWinExeName variable for process filtering, and use Test to verify. Confirm with OK.
Change target window
- Purpose: Configure a Change Target Window action to set the target window for subsequent actions in the macro.
- How to Open: In the macro editor, add or edit a Change target window action.
- UI Layout:
- Target window combo box (lists open windows, supports wildcards *, ?)
- OK/Cancel buttons
- Required Inputs: Target window title or pattern.
- LLM Guidance: Instruct the user to select or enter the window title (using wildcards as needed) and confirm with OK. This sets the target for following actions.
ChangeWin
- Purpose: Configure a Change Display Style action to modify a window's style (normal, minimized, maximized), transparency, topmost status, and border visibility.
- How to Open: In the macro editor, add or edit a ChangeWin action.
- UI Layout:
- Target window combo box (lists open windows, supports wildcards *, ?)
- Checkbox: Set window style (enables radio buttons for Normal, Minimize, Maximize)
- Checkbox: Set transparency (enables slider for transparency 0-255)
- Checkbox: Set TopMost (radio buttons: Set/Unset)
- Checkbox: Set border (radio buttons: Hide, Unhide, Toggle)
- Test button (applies selected style to window)
- OK/Cancel buttons
- Required Inputs: Target window, and at least one style option enabled.
- LLM Guidance: Instruct the user to select or enter the window title, enable the desired style options, adjust settings (style, transparency, topmost, border), and use Test to preview. Confirm with OK.
WaitForPixel
- Purpose: Configure a Wait for Pixel action to pause macro execution until a specific pixel color appears/disappears at given coordinates, with advanced options for tolerance, radius, and timing.
- How to Open: In the macro editor, add or edit a WaitForPixel action.
- UI Layout:
- X/Y coordinate inputs (numeric or variable)
- Get Coords button (captures mouse position)
- Relative to window checkbox and corner dropdown
- Color pickers/inputs for R, G, B values
- Tolerance slider, radius slider
- Timeout input (seconds), pollrate input (ms)
- Restrict X/Y checkboxes, restrict radius input
- Radio buttons: Wait for appearance/disappearance
- Exit loop on match checkbox
- Test button (checks pixel at specified location)
- OK/Cancel buttons
- Required Inputs: Coordinates, color, and at least one of appearance/disappearance. Optional: tolerance, radius, timeout, pollrate, restrictions.
- LLM Guidance: Instruct the user to enter coordinates and color, set options as needed (tolerance, radius, timeout, etc.), and use Get Coords/Test to verify. Confirm with OK.
- Hotkeys: Standard dialog navigation (Enter/OK, Esc/Cancel, Tab navigation). F10/PrintScreen: Activate pixel picker when Get Coords button is clicked.
SpeakText
- Purpose: Configure a Speak Text action to use text-to-speech (TTS) to speak specified text, with options for voice, device, volume, speed, and synchronous execution.
- How to Open: In the macro editor, add or edit a SpeakText action.
- UI Layout:
- Text to Speak input (multi-line, supports variables and SSML/XML, use ";" to randomize)
- Voice dropdown (lists installed voices, "Default")
- Sound Device input (number, 0 or empty = default device)
- Volume slider (0-100)
- Speed input (numeric, -5 to +7)
- Synchronous checkbox (wait for speech to finish)
- Test button (plays the speech)
- OK/Cancel buttons
- Required Inputs: Text to speak. Optional: voice, device, volume, speed, sync.
- LLM Guidance: Instruct the user to enter the text, select voice/device if needed, adjust volume/speed, choose sync, and use Test to preview. Confirm with OK.
SpeechToText
- Purpose: Configure a Speech to Text action to recognize spoken phrases, map them to actions, and optionally write results to a file or variable.
- How to Open: In the macro editor, add or edit a SpeechToText action.
- UI Layout:
- Text file input (for phrases, separated by new lines)
- Browse button (select file)
- Phrases grid (phrase, auto-action: Confirm, Confirm & Exit)
- Exit/Confirm/Delete/Abort command inputs
- Write all recognized words checkbox
- Play system feedback sounds checkbox
- Volume slider
- OK/Cancel buttons
- Required Inputs: At least one phrase and exit/confirm/delete/abort commands. Optional: file, write all, play sounds, volume.
- LLM Guidance: Instruct the user to enter phrases, set commands, adjust options, and confirm with OK. Use the grid for mapping phrases to actions.
ShowDialog
- Purpose: Configure a Show Dialog action to display a dialog box with custom text, title, buttons, position, and timeout options.
- How to Open: In the macro editor, add or edit a ShowDialog action.
- UI Layout:
- Dialog text input (multi-line, supports variables)
- Title input
- Button 1/2/3 text inputs
- Start position radio buttons (CenterScreen, WindowsDefaultLocation, Manual)
- X/Y position inputs (for manual position)
- Wait until closed checkbox
- Timeout checkbox and input (seconds)
- OK/Cancel buttons
- Required Inputs: Dialog text. Optional: title, buttons, position, wait, timeout.
- LLM Guidance: Instruct the user to enter dialog text, set title/buttons as needed, choose position/wait/timeout options, and confirm with OK.
RunOtherMacro
- Purpose: Configure a Run Other Macro action to execute another macro (from current or other profile), with options for synchronous execution and single instance.
- How to Open: In the macro editor, add or edit a RunOtherMacro action.
- UI Layout:
- Profile dropdown (select current or other profile)
- Macro list/grid (select macro to run)
- Variable input (to run macro by variable name/GUID)
- Search box and navigation buttons
- Synchronous checkbox (wait for macro to finish)
- Run only one thread checkbox
- OK/Cancel buttons
- Required Inputs: Macro to run (by selection or variable). Optional: sync, single instance.
- LLM Guidance: Instruct the user to select profile/macro or enter variable, set sync/single instance as needed, and confirm with OK.
ShowUI
- Purpose: Configure a Show UI action to display a custom user interface window with controls (buttons, textboxes, checkboxes, etc.), layout, and variable bindings.
- How to Open: In the macro editor, add or edit a ShowUI action.
- UI Layout:
- UI preview window (drag/drop controls, set properties)
- Controls list (add/remove/clone controls: Button, CheckBox, Label, ListBox, NumericUpDown, Panel, RadioButton, TextBox, DateTimePicker)
- Property grid (edit control properties: name, text, value, items, result variable, etc.)
- Snap to grid checkbox
- Result variable dropdown (store user input)
- Delete/Clone buttons
- OK/Cancel buttons
- Required Inputs: At least one UI control. Optional: result variable, layout, properties.
- LLM Guidance: Instruct the user to add controls, set properties, bind result variables, and confirm with OK. Use the preview to arrange and test the UI.
- Hotkeys: Standard dialog navigation (Enter/OK, Esc/Cancel, Tab navigation). Delete: Delete selected UI element. Tab: Cycle through UI controls in preview.
SetState
- Purpose: Configure a Set State action to set the toggle or rotate state for a macro in the current or another profile.
- How to Open: In the macro editor, add or edit a SetState action.
- UI Layout:
- Profile dropdown (select current or other profile)
- Macro list/grid (select macro to set state for)
- Set Toggle state checkbox (enables Toggle ON/OFF/Toggle radio buttons)
- Set Rotate state checkbox (enables rotate index input)
- Rotate index input (numeric)
- OK/Cancel buttons
- Required Inputs: Macro selection, and at least one of toggle or rotate state set.
- LLM Guidance: Instruct the user to select profile/macro, enable toggle/rotate as needed, set values, and confirm with OK.
WriteToLog
- Purpose: Configure a Write to Log action to write text (with optional label and color) to the log view for debugging or user feedback.
- How to Open: In the macro editor, add or edit a WriteToLog action.
- UI Layout:
- Text input (multi-line, supports variables)
- Label input (optional, for log grouping)
- Color picker (panel and button to select color)
- OK/Cancel buttons
- Required Inputs: Text to log. Optional: label, color.
- LLM Guidance: Instruct the user to enter the text, set label/color as needed, and confirm with OK.
Kill Process
- Purpose: Configure a Kill Process action to terminate a running process by name.
- How to Open: In the macro editor, add or edit a Kill Process action.
- UI Layout:
- Process name combo box (lists running processes, allows manual entry)
- Refresh button (updates process list)
- Test button (terminates selected process)
- Warning label (explains force close and data loss risk)
- OK/Cancel buttons
- Required Inputs: Process name.
- LLM Guidance: Instruct the user to select or enter the process name, use Refresh/Test as needed, and confirm with OK. Warn about data loss risk.
If/ElseIf
- Purpose: Configure an If or ElseIf action to add conditional logic to a macro, using variables, math, and string functions.
- How to Open: In the macro editor, add or edit an If or ElseIf action.
- UI Layout:
- Condition input (multi-line, supports variables and functions)
- If/ElseIf radio buttons
- Help/info panel (shows syntax and usage tips)
- OK/Cancel buttons
- Required Inputs: Condition expression, and If/ElseIf selection.
- LLM Guidance: Instruct the user to enter the condition, select If or ElseIf, and confirm with OK. Use the help panel for syntax guidance.
Loop Start/Loop End
- Purpose: Configure a Loop action to repeat a set of actions a specified number of times (or infinitely).
- How to Open: In the macro editor, add or edit a Loop Start or Loop End action.
- UI Layout:
- Loop count input (numeric or variable, 0 = infinite)
- Vertical scrollbar (adjusts loop count)
- OK/Cancel buttons
- Required Inputs: Loop count.
- LLM Guidance: Instruct the user to enter the loop count (or variable), use the scrollbar to adjust, and confirm with OK. Explain that 0 means infinite loop.
InsertText
- Purpose: Configure an Insert Text action to insert or type text at the cursor position, with options for keyboard simulation and alternative methods.
- How to Open: In the macro editor, add or edit an InsertText action.
- UI Layout:
- Text input (multi-line, supports variables and placeholders)
- Simulate keyboard typing checkbox
- Use alternative method checkbox
- Click duration input (ms, numeric)
- Pause between clicks input (ms, numeric)
- OK/Cancel buttons
- Required Inputs: Text to insert. Optional: keyboard/alternative method, timing options.
- LLM Guidance: Instruct the user to enter the text, select keyboard/alternative options as needed, set timing, and confirm with OK.
PixelFromScreen
- Purpose: Open a pixel picker tool to select a screen pixel and capture its color and coordinates for use in WaitForPixel or related actions.
- How to Open: In the WaitForPixel action, click the Get Coords button.
- UI Layout:
- Screenshot display (click to select pixel)
- Color label (shows RGB and hex value)
- Coordinates label (shows X/Y position)
- Zoom preview
- Monitor selector (if multiple monitors)
- Keep Image checkbox
- Paste from Clipboard button
- Help label (instructions for use)
- Required Inputs: Select a pixel by clicking on the screenshot.
- LLM Guidance: Instruct the user to click the desired pixel, review the color/coordinates, and confirm selection. Use zoom and monitor selector as needed.
UIWindow
- Purpose: Display and interact with a custom user interface window (ShowUI action), allowing the user to preview and test UI controls.
- How to Open: In the ShowUI action editor, click Preview or run the macro with ShowUI.
- UI Layout:
- Controls panel (shows all UI controls added to the window)
- Keyboard navigation (Tab to cycle controls, Delete to remove selected control)
- Tooltips for controls
- Required Inputs: At least one UI control must be present for interaction.
- LLM Guidance: Instruct the user to interact with controls, use Tab/Delete for navigation, and close the window when done. Use Preview to test UI layout.
SearchVariables
- Purpose: Search, filter, and select variables from all available scopes (local, profile, global, saved) for use in macro actions.
- How to Open: In any variable selection dialog, click the search or browse button.
- UI Layout:
- Variable type filters (Local, Profile, Global, Saved checkboxes)
- Search box (with autocomplete)
- Search, Previous, Next buttons
- Variables grid (shows type and name)
- OK/Cancel buttons
- Required Inputs: Select a variable from the grid or search results.
- LLM Guidance: Instruct the user to filter by type, search or browse for the variable, select it, and confirm with OK.
TestDialog
- Purpose: Preview and test a dialog box as configured in the ShowDialog action, including all buttons and text.
- How to Open: In the ShowDialog action editor, click Test or Preview.
- UI Layout:
- Dialog text label (shows the dialog message)
- Button1, Button2, Button3 (as configured)
- Title bar (shows dialog title)
- Required Inputs: None; this is a preview window.
- LLM Guidance: Instruct the user to review the dialog, test button actions, and close the preview when done.
Goto
- Purpose: Configure a Goto action to jump to a specified label within the macro for flow control.
- How to Open: In the macro editor, add or edit a Goto action.
- UI Layout:
- Label selection combo box (lists available labels in the macro)
- OK/Cancel buttons
- Required Inputs: Select a label to jump to.
- LLM Guidance: Instruct the user to select the target label from the list and confirm with OK. If no labels exist, instruct the user to add a label first.
HideOSD
- Purpose: Configure a Hide OSD action to hide a specified On-Screen Display (OSD) by name.
- How to Open: In the macro editor, add or edit a HideOSD action.
- UI Layout:
- OSD name combo box (lists available OSDs)
- OK/Cancel buttons
- Required Inputs: Select the OSD name to hide.
- LLM Guidance: Instruct the user to select the OSD name from the list and confirm with OK. If no OSDs exist, instruct the user to add an OSD first.
VMWindow
- Purpose: Configure a Minimize, Restore, or Toggle action for the VoiceMacro main window.
- How to Open: In the macro editor, add or edit a VMWindow action.
- UI Layout:
- Radio buttons: Minimize, Restore, Toggle
- Prompt label (explains the action)
- OK/Cancel buttons
- Required Inputs: Select one of Minimize, Restore, or Toggle.
- LLM Guidance: Instruct the user to choose the desired window state and confirm with OK.
Start/Stop/Toggle Actions
- Purpose: Configure a Start, Stop, or Toggle action for macro execution, listening, scheduler, or other toggleable features.
- How to Open: In the macro editor, add or edit a Start/Stop/Toggle action.
- UI Layout:
- Radio buttons: Start, Stop, Toggle
- Prompt label (explains the action)
- OK/Cancel buttons
- Required Inputs: Select one of Start, Stop, or Toggle.
- LLM Guidance: Instruct the user to choose the desired action and confirm with OK.
Open
- Purpose: Configure an Open File action to launch an application or file, with arguments, working directory, window style, and synchronous execution.
- How to Open: In the macro editor, add or edit an Open action.
- UI Layout:
- File to Open: Text input and "..." browse button (opens file dialog)
- Arguments: Multi-line text input (supports variables/placeholders)
- Working Directory: Text input and "..." browse button (opens folder dialog)
- Window Style: Dropdown (Normal, Hidden, Minimized, Maximized)
- Synchronous: Checkbox (wait for process to exit before continuing macro)
- OK/Cancel buttons
- Required Inputs: File path. Optional: arguments, working directory, window style, synchronous.
- LLM Guidance: Instruct the user to browse for or enter the file path, add arguments if needed, set the working directory, choose the window style, and enable synchronous execution if the macro should wait for the process to finish. Confirm with OK.
Switch profile
- Purpose: Configure a Switch Profile action to change the active profile during macro execution.
- How to Open: In the macro editor, add or edit a Switch profile action.
- UI Layout:
- Select Profile: Dropdown (lists available profiles)
- OK/Cancel buttons
- Required Inputs: Profile to switch to.
- LLM Guidance: Instruct the user to select the desired profile from the dropdown and confirm with OK. This action will switch the active profile for subsequent macro actions.
AddProfile
- Purpose: Create or edit a macro profile, set its name, target windows, process names, linked profiles, and status (default, global, active/inactive).
- How to Open: In the main window or profile manager, add or edit a profile.
- UI Layout:
- Profile List/Grid: Shows all profiles with columns for Default, Global, Name, Target Window, Process Name, Linked Profiles, and Status. Supports row selection, Up/Down movement, Clone, Delete, and status toggles.
- Profile Name: Text input for the display name.
- Target window: Combo box (supports wildcards, multiple entries with semicolon, SHIFT to add window)
- Target window process name(s): Combo box (supports wildcards, multiple entries, SHIFT to add process)
- Lock Profile: Checkbox (locks profile until executable is terminated)
- Target profile(s): Text input (profile names that include this profile if activated, supports wildcards and multiple entries)
- Buttons: Clone, Delete, Toggle Default, Toggle Global, Toggle Active, Up, Down
- OK/Cancel buttons
- Info/Help label: Explains wildcards, linking, and profile options
- Required Inputs: Profile name. Optional: target window, process name, linked profiles, status toggles.
- LLM Guidance: Instruct the user to enter a profile name, set target windows and process names as needed, link profiles if required, and use the buttons to manage status (default/global/active). Use Clone/Delete/Up/Down for profile management. Confirm with OK.
SetHotkey
- Purpose: Assign or edit a keyboard, mouse, or controller hotkey for macro activation, with advanced options for modifiers, click type, passthrough, and trigger mode.
- How to Open: In the macro editor or hotkey assignment dialog, add or edit a hotkey for a macro.
- UI Layout:
- Key/Button Selection: "Please press a key" button (captures key, mouse, or controller input)
- Key Code List: Button to open a list of available key codes
- Modifiers: Checkboxes for lShift, lCTRL, lAlt, lWin, rShift, rCTRL, rAlt, rWin
- Mouse Buttons: Checkboxes for Left, Right, Middle, X1, X2
- Mouse Wheel: Checkboxes for Up, Down, Left, Right (scroll directions)
- Click Type: Radio buttons for Single click, Double click, Triple click
- Trigger Mode: Radio buttons for Press, Down, Up (when macro executes)
- Passthrough: Checkbox to allow the hotkey to pass through to other applications
- Ignore Modifiers: Checkbox to ignore modifier keys (SHIFT, CTRL, ALT, WIN)
- Clear All: Button to reset all selections
- OK/Cancel buttons
- Tooltips: Many controls have tooltips explaining their function and usage
- Required Inputs: At least one key, mouse button, or controller input. Optional: modifiers, click type, passthrough, ignore modifiers, trigger mode.
- LLM Guidance: Instruct the user to click the key selection button and press the desired key, mouse button, or controller button. Select modifiers and click type as needed. Choose trigger mode (Press/Down/Up), enable passthrough or ignore modifiers if required, and use Clear All to reset. Use the Key Code List for reference. Confirm with OK.
Change window Title
- Purpose: Configure a Change Window Title action to modify the title of the active window.
- How to Open: In the macro editor, add or edit a Change window Title action.
- UI Layout:
- Set window Title (Active window): Label explaining the action
- Title: Text input (supports variables/placeholders, context menu for placeholders)
- OK/Cancel buttons
- Required Inputs: New window title text.
- LLM Guidance: Instruct the user to enter the new window title in the text field, use variables or placeholders if needed, and confirm with OK. The action will change the title of the currently active window.
ChangeEngine
- Purpose: Configure a Change Recognition Engine action to switch between different speech recognition engines.
- How to Open: In the macro editor, add or edit a ChangeEngine action.
- UI Layout:
- Select Speech Recognition Engine: Label explaining the action
- Engine dropdown: Lists available speech recognition engines
- OK/Cancel buttons
- Required Inputs: Select a speech recognition engine from the dropdown.
- LLM Guidance: Instruct the user to select the desired speech recognition engine from the dropdown list and confirm with OK. This action will switch the active speech recognition engine for voice commands.
Macro Structure
- Profile: Container for related macros (e.g., [Profile: Gaming]).
- Macro Name: Unique identifier (e.g., OpenNotepad).
- Actions: List of commands executed in order (e.g., Key, Mouse, Pause, etc.).
- Triggers: Voice commands or hotkeys that activate the macro.
- Options: Repeat, OnlyIfTargetWinActive, ActivateTargetWin, etc.
[Profile: Work]
Macro: OpenApp
Trigger: "Open application"
Action 1: Open "C:\app.exe"
Action 2: Pause (1.000 sec)
All Macro Actions
Below is a complete, up-to-date list of all available macro actions in VoiceMacro. Each action includes its name, description, parameters, and an example. Parameters marked green support variables (e.g., {Variable}
).
UI Hotkeys & Keyboard Shortcuts
VoiceMacro supports extensive keyboard navigation and hotkeys for both macro execution and UI control. Important: Hotkeys are context-dependent and only work when the relevant window or menu is active. The same hotkey combination may perform different actions depending on which window has focus.
Main Window Navigation
When the main VoiceMacro window is active:
- Alt+E: Edit profiles and macros (Edit... button)
- Alt+M: Add macro to current profile (Add macro button)
- Alt+A: Toggle Auto profile switching
- Alt+S: Toggle Shortcuts
- Alt+L: Toggle Listen
- Alt+X: Toggle Execute
- Alt+D: Toggle Scheduler
- Alt+C: Toggle Controllers
- Ctrl+C: Copy log line
- Alt+F: Filter log (Mouse/Keyboard/Controller)
- Alt+W: Word wrap log
- Alt+O: Show only recognized commands
- Alt+L: Clear log
Main Menu (Alt key)
When the main menu is open (press Alt to activate):
- Alt+A: Add macro to current profile
- Alt+E: Add/Edit profiles and macros
- Alt+R: Recognizer settings
- Alt+W: Windows speech recognizer
- Alt+S: Startup settings
- Alt+S: Start with Windows
- Alt+M: Start minimized
- Alt+R: Remote Control
- Alt+E: Remote Control Enabled
- Alt+S: Remote Control Settings
- Alt+H: Show hints
- Alt+T: Always show Tray Icon
- Alt+T: Stay on Top
- Alt+M: Minimize instead close
- Alt+D: Enable Dark Mode
- Alt+S: Show data directory
- Alt+C: Remap Controllers
- Alt+D: Documentation
- Alt+H: Help
- Alt+A: About VoiceMacro
- Alt+X: Exit VoiceMacro
Profiles & Macros Window
When the Profiles & Macros window is active:
- Alt+A: Add New macro
- Alt+E: Edit selected macro
- Alt+U: Move macro Up
- Alt+D: Move macro Down
- Alt+C: Clone selected macro
- Alt+T: Toggle Active status
- Alt+X: AutoEx (auto activate when switching away)
- Alt+S: Search macros
- Delete: Delete selected macro
- F2: Edit selected macro
- Ctrl+C / Ctrl+V: Copy/paste macros
Context Menu (Right-click on macros)
When the context menu is open (right-click on a macro):
- Alt+E: Edit group affixes
- Alt+R: Rename group
- Alt+D: Delete group
- Alt+E: Expand all groups
- Alt+C: Collapse all groups
- Alt+S: Sort groups
- Alt+C: Copy selected to clipboard
- Alt+A: Copy all to clipboard
- Alt+G: Copy profile/macro GUID's
- Alt+S: Sort macros
- Alt+T: Toggle active
- Alt+H: Highlight macros using coordinates
- Alt+D: Delete all macros
- Alt+S: Search
- Alt+E: Export HTML
Macro Editor (AddMacro Window)
When the Macro Editor window is active:
- Alt+K: Add Keyboard action
- Alt+M: Add Mouse action
- Alt+P: Add Pause action
- Alt+R: Add Recorder action
- Alt+O: Other actions menu (contains most actions)
- Alt+S: Statements & conditions
- Alt+L: Loop Start
- Alt+R: Rotate
- Alt+T: Set toggle/rotate state
- Alt+C: Continue
- Alt+X: Exit macro
- Alt+I: If/Else/EndIf
- Alt+E: EndIf
- Alt+O: OnTimeOut
- Alt+G: Goto (label)
- Alt+N: Minimize/restore VoiceMacro window
- Alt+H: Hide OSD
- Alt+S: Switch to profile
- Alt+G: Get key state
- Alt+W: Window manipulation
- Alt+R: Resize/move window
- Alt+C: Change window title
- Alt+B: Block Input
- Alt+E: Execute/open a file
- Alt+P: Play sound
- Alt+W: Window to front and activate
- Alt+C: Close window
- Alt+K: Kill process
- Alt+I: Insert text
- Alt+C: Copy to clipboard
- Alt+P: Paste from clipboard
- Alt+A: Abort actions
- Alt+A: Abort all running macros
- Alt+C: Clone macro
- Alt+U: Move action Up
- Alt+D: Move action Down
- Alt+E: Edit action
- Alt+T: Test macro
- Ctrl+X: Cut action(s)
- Ctrl+C: Copy action(s)
- Ctrl+V: Paste action(s)
- CapsLock: Start/stop recording
- F2: Edit selected action
- F3 / Shift+F3: Search next/previous
- Esc: Cancel/close dialog
- Enter: Save/search/confirm
- Tab / Shift+Tab: Navigate fields/grids
Other Actions Menu (Alt+O)
When the "Other" menu is open in the Macro Editor:
- Alt+S: Statements & conditions submenu
- Alt+C: Control VoiceMacro submenu
- Alt+A: Advanced submenu
- Alt+I: Insert comment
- Alt+W: Write to Log
- Alt+E: Execute/open a file
- Alt+P: Play sound
- Alt+S: Stop sound
- Alt+S: Speak text
- Alt+W: Window to front and activate
- Alt+W: Wait for window
- Alt+W: Wait for pixel
- Alt+C: Close window
- Alt+K: Kill process
- Alt+I: Insert text
- Alt+C: Copy to/paste from clipboard submenu
- Alt+A: Abort submenu
Statements & Conditions Submenu (Alt+S)
- Alt+V: Set variable
- Alt+L: Loop Start
- Alt+L: Loop End
- Alt+T: Toggle/rotate submenu
- Alt+C: Continue
- Alt+E: Exit loop
- Alt+E: Exit macro
- Alt+I: If/Else/EndIf submenu
- Alt+O: OnTimeOut
- Alt+E: End OnTimeOut
- Alt+L: Insert label
- Alt+G: Goto (label)
Toggle/Rotate Submenu (Alt+T)
- Alt+O: Toggle On
- Alt+O: Toggle Off
- Alt+R: Rotate
- Alt+R: RotateEnd
- Alt+S: Set toggle/rotate state
- Alt+R: Reset all toggle/rotate states
If/Else/EndIf Submenu (Alt+I)
- Alt+I: If / ElseIf
- Alt+E: Else
- Alt+E: EndIf
Control VoiceMacro Submenu (Alt+C)
- Alt+K: Enable/Disable keyboard shortcuts
- Alt+C: Enable/Disable controllers
- Alt+L: Start/stop listening
- Alt+I: Start/stop ignore voice commands
- Alt+R: Change Recognizer Engine
- Alt+S: Start/stop scheduler
- Alt+E: Start/stop executing macros
- Alt+A: Start/stop auto profile switching
- Alt+M: Minimize/restore VoiceMacro window
Advanced Submenu (Alt+A)
- Alt+D: Show Dialog
- Alt+U: Show UI
- Alt+O: Show OSD
- Alt+H: Hide OSD
- Alt+S: Switch to profile
- Alt+C: Change target window
- Alt+T: Speech to text
- Alt+G: Get key state
- Alt+V: Send Virtual Keys
- Alt+R: Run other macro
- Alt+S: Send to Plugin
- Alt+W: Window manipulation submenu
- Alt+B: Block Input submenu
Window Manipulation Submenu (Alt+W)
- Alt+D: Change DisplayStyle
- Alt+R: Resize/move window
- Alt+C: Change window title
Block Input Submenu (Alt+B)
Copy to/Paste from Clipboard Submenu (Alt+C)
- Alt+C: Copy to clipboard
- Alt+P: Paste from clipboard
Abort Submenu (Alt+A)
- Alt+A: Abort all running macros
- Alt+P: Abort all macros from this profile
- Alt+T: Abort this macro
Window Manipulation Submenu (Alt+W)
When the "Window manipulation" submenu is open:
- Alt+W: Window to front and activate
- Alt+W: Wait for window
- Alt+R: Resize/move window
- Alt+C: Close window
- Alt+C: Change window title
- Alt+C: Change display style
- Alt+C: Change target window
Action Forms & Dialogs
Standard navigation for all dialogs and action forms:
- Alt+[Key]: Menu navigation (standard Windows)
- Enter: OK/Confirm
- Esc: Cancel/Close
- Tab/Shift+Tab: Navigate between controls
Special hotkeys:
- F10 / PrintScreen: Activate pixel picker (in WaitForPixel action)
- Delete: Delete selected UI element (in ShowUI action)
- Tab: Cycle through UI controls (in ShowUI action)
- Hotkey assignment options: Single, double, or triple click; key down, up, or press; pass-through; ignore modifiers; mouse/controller support.
- Accessibility: All dialogs and grids support Tab/Shift+Tab navigation and keyboard focus.
- Tip: You can assign the same hotkey to multiple macros using click types or modifier keys.
Variables & Functions
Variables allow dynamic content in macros. They are enclosed in curly braces {VariableName}
and can be set or manipulated using the SetVariable action. There are several types and many built-in internal variables and functions.
- Types: Local (macro), Profile-wide, Global, Global (saved to disk)
- Internal Variables:
{Time}
, {Date}
, {FullTime}
, {FullDate}
, {DateTime}
, {DayNumeric}
, {DayNumeric00}
, {FullDay}
, {ShortDay}
, {DayOfWeek}
, {MonthNumeric}
, {MonthNumeric00}
, {FullMonth}
, {ShortMonth}
, {Year}
, {FullYear}
, {Hours}
, {Hours00}
, {Minutes}
, {Minutes00}
, {Seconds}
, {Seconds00}
, {Milliseconds}
, {ElapsedMilliseconds}
, {MouseX}
, {MouseY}
, {CurrentWinTitle}
, {CurrentWinProc}
, {CurrentExePath}
, {ProfileName}
, {MacroName}
, {ProfileMacroGUID}
, {RotateNumber}
, {ToggleState}
, {ErrorLevel}
, {UserIdleTime}
, {RecCommand}
, {OnlyCommand}
, {CommandPrefix}
, {CommandSuffix}
, {WinPosX}
, {WinPosY}
, {WinWidth}
, {WinHeight}
, {WinTransparency}
, {LoopCounter}
, {LoopIndex}
, {RepeatCounter}
, {MicLevel}
, {VMWindowState}
, {LastRecognized}
, {AudioDeviceName#}
, {SetWinExeName}
, {DialogResult}
, {ActivatedBy}
, {Clipboard}
, {IgnoreExceptions}
, {DisabledGroups}
, {&TAB}
, {&CR}
, {&LF}
, {&CRLF}
, {"E}
, {file://path}
, {http://url}
, {https://url}
, {DialogGetFile}
, {DialogSaveFile}
, {DialogGetFolder}
.
- Functions:
RANDOM x-y
, SQRT[x]
, SIN[x]
, SINH[x]
, COS[x]
, COSH[x]
, TAN[x]
, TANH[x]
, LOG[x]
, LOG10[x]
, EXP[x]
, ROUND0[x]
, ROUND1[x]
, ROUND2[x]
, ROUND3[x]
, STRLEN[var]
, SUBSTR[start, var, length]
, FIND[var, "str", start]
, REPLACE[var, old, new]
, TOUPPER[var]
, TOLOWER[var]
, PROPERCASE[var]
, DECTOHEX[var]
, HEXTODEC[var]
, GETNUM[var, n, default]
, TRIM[var]
, LTRIM[var]
, RTRIM[var]
, GETARRAY[var, delim]
.
- Math/Logic: All standard math operators (+, -, *, /, MOD), and logical/compare operators (=, <>, >, <, >=, <=, StartsWith, EndsWith, Contains).
Set a variable to a random value:
Action: SetVariable MyVar = RANDOM 1-10
Use a variable in text:
Action: InsertText {MyVar}
Variable Functions Reference
- RANDOM x-y: Random integer between x and y.
- SQRT[x]: Square root of x.
- SIN[x], COS[x], TAN[x], LOG[x], LOG10[x], EXP[x]: Standard math functions.
- ROUND0[x], ROUND1[x], ROUND2[x], ROUND3[x]: Round to 0, 1, 2, or 3 decimals.
- STRLEN[var]: Length of string.
- SUBSTR[start, var, length]: Substring from var.
- FIND[var, "str", start]: Index of substring.
- REPLACE[var, old, new]: Replace text.
- TOUPPER[var], TOLOWER[var], PROPERCASE[var]: Change case.
- DECTOHEX[var], HEXTODEC[var]: Convert numbers.
- GETNUM[var, n, default]: Extract number from string.
- TRIM[var], LTRIM[var], RTRIM[var]: Remove whitespace.
- GETARRAY[var, delim]: Split string to array and create individual variables.
Array Handling in VoiceMacro
VoiceMacro handles arrays through the GETARRAY[var, delim]
function. When you use this function, VoiceMacro automatically creates individual variables for each array element and stores the array length.
How GETARRAY Works:
- Syntax:
GETARRAY[VariableName, delimiter]
- Creates: Individual variables named
VariableName1
, VariableName2
, etc.
- Returns: The array length (number of elements)
- Example:
GETARRAY[MyArray, ","]
with value "apple,banana,cherry" creates:
{MyArray1}
= "apple"
{MyArray2}
= "banana"
{MyArray3}
= "cherry"
- Returns: 3 (array length)
Array Usage Examples:
Example 1: Basic Array Creation
Action 1: SetVariable MyArray = apple,banana,cherry
Action 2: SetVariable ArrayLength = GETARRAY[MyArray, ","]
Action 3: WriteToLog "Array has {ArrayLength} elements: {MyArray1}, {MyArray2}, {MyArray3}"
Example 2: Loop Through Array
Action 1: SetVariable Colors = red,green,blue,yellow
Action 2: SetVariable ColorCount = GETARRAY[Colors, ","]
Action 3: Loop Start ({ColorCount}x)
Action 4: SpeakText "Color {LoopIndex} is {Colors{LoopIndex}}"
Action 5: Loop End
Example 3: Array with Different Delimiter
Action 1: SetVariable Paths = C:\Windows;C:\Program Files;C:\Users
Action 2: SetVariable PathCount = GETARRAY[Paths, ";"]
Action 3: WriteToLog "Found {PathCount} paths"
Example 4: Dynamic Array Access
Action 1: SetVariable Fruits = apple,banana,cherry,orange
Action 2: SetVariable Index = 2
Action 3: SetVariable SelectedFruit = {Fruits{Index}}
Action 4: SpeakText "Selected fruit: {SelectedFruit}"
Triggers
Macros are activated by various trigger mechanisms. VoiceMacro supports 11 different ways to trigger macros, from voice commands to remote control.
- Voice Commands: Natural language phrases like "Open Notepad" (case-insensitive)
- Hotkeys: Keyboard combinations, mouse buttons, or controller inputs
- Time-based: Scheduler for automated execution at specific times
- External: Command line arguments, remote control, plugin integration
- Context-aware: Auto profile switching based on active windows
- Multiple Triggers: A macro can use several trigger types simultaneously
Example Multi-Trigger Macro:
Voice Command: "Open Notepad"
Hotkey: Ctrl+Alt+N
Controller: Button X
Scheduler: Daily at 9:00 AM
For complete details on all trigger mechanisms, see the All Macro Trigger Mechanisms section below.
All Macro Trigger Mechanisms
VoiceMacro supports 11 different ways to trigger macros. Each trigger mechanism has specific use cases, setup requirements, and advantages. A single macro can use multiple trigger types simultaneously.
1. Voice Commands (UseRecognition)
Trigger ID: 0 (ActivatedBy = 0)
- Description: Speech recognition-based activation using natural language commands
- Setup: Check "Voice Command" in macro editor, enter command phrases separated by semicolons
- Requirements: Microphone, trained speech recognition engine, VoiceMacro listening enabled
- Best For: Hands-free operation, accessibility, natural language control
- Examples: "Open Notepad", "What time is it", "Mute system"
- Multiple Commands: Use semicolon separator: "Open Notepad;Launch Notepad;Start Notepad"
- Tips: Avoid one-word commands, use descriptive phrases, train speech engine thoroughly
2. Keyboard/Mouse Hotkeys (UseShortCut)
Trigger ID: 1 (ActivatedBy = 1)
- Description: Keyboard combinations, mouse buttons, or mouse wheel actions
- Setup: Check "Shortcut" in macro editor, click "Set Shortcut" to configure
- Supported: All keyboard keys, modifier keys (Ctrl, Alt, Shift, Win), mouse buttons (Left, Right, Middle, X1, X2), mouse wheel (Up, Down, Left, Right)
- Click Types: Single click, double click, triple click
- Trigger Modes: Press (when key is pressed), Down (when key is pressed down), Up (when key is released)
- Options: Pass-through (allow key to reach other applications), ignore modifiers
- Best For: Quick access, gaming, precise timing, system-wide shortcuts
- Examples: Ctrl+Alt+N, F12, Mouse Button 4, Ctrl+Mouse Wheel Up
3. Other Macros (RunOtherMacro)
Trigger ID: 2 (ActivatedBy = 2)
- Description: Macro triggered by execution of another macro
- Setup: Use "Run Other Macro" action in the calling macro
- Options: Synchronous execution (wait for completion), single instance (prevent multiple executions)
- Target: Macros in current profile or other profiles
- Best For: Modular macro design, complex automation chains, reusable components
- Examples: Main macro calls helper macros, macro chains, modular automation
4. Testing Mode
Trigger ID: 3 (ActivatedBy = 3)
- Description: Manual testing of macros using the "Test" button
- Setup: Click "Test" button in macro editor or profiles window
- Purpose: Debug and verify macro functionality without real triggers
- Best For: Development, debugging, step-by-step testing
5. Auto Profile Switching (Auto)
Trigger ID: 4 (ActivatedBy = 4)
- Description: Macro automatically executes when switching TO a profile
- Setup: Select macro in profiles window, click "Auto" button to toggle
- Requirements: Auto profile switching enabled, profile with target window set
- Best For: Profile initialization, context-aware automation, setup tasks
- Examples: Initialize applications when switching to work profile, setup gaming environment
6. Command Line Arguments
Trigger ID: 5 (ActivatedBy = 5)
- Description: External program communication via command line parameters
- Setup: Use command line arguments when launching VoiceMacro.exe
- Supported Commands:
/ExecuteMacro=ProfileGUID/MacroGUID
- Execute by GUIDs
/ExecuteMacro=ProfileName/MacroName
- Execute by names
/VoiceCommand="My Voice Command"
- Execute by voice command
/SetVariable:MyVariable="value"
- Set variables
/GetVariable=MyVariable
- Get variable values
/ShowWindow
- Show VoiceMacro's main window
- Best For: External program integration, batch processing, automation scripts
- Examples: Scheduled tasks, external applications, automation workflows
7. Scheduler (UseScheduler)
Trigger ID: 6 (ActivatedBy = 6)
- Description: Time-based execution using built-in scheduler
- Setup: Check "Scheduler" in macro editor, click "Set Scheduler" to configure
- Supported Schedules:
- Daily: Execute at specific time each day
- Weekly: Execute on specific days of the week
- Monthly: Execute on specific dates each month
- Yearly: Execute on specific dates each year
- Interval: Execute every X minutes/hours/days
- One-time: Execute once at specific date/time
- Options: Active/inactive state, multiple schedules per macro
- Best For: Automated maintenance, periodic tasks, time-based automation
- Examples: Daily backups, weekly reports, periodic system checks
8. Auto Profile Switching - Exit (AutoEx)
Trigger ID: 7 (ActivatedBy = 7)
- Description: Macro automatically executes when switching AWAY from a profile
- Setup: Select macro in profiles window, click "AutoEx" button to toggle
- Requirements: Auto profile switching enabled, profile with target window set
- Best For: Cleanup tasks, saving work, closing applications
- Examples: Save documents when leaving work profile, close applications when switching away
9. Plugin Integration
Trigger ID: 8 (ActivatedBy = 8)
- Description: Macro triggered by plugin events or external plugin calls
- Setup: Use "SendToPlugin" action or plugin SDK integration
- Requirements: Plugin installed and configured, plugin SDK for custom plugins
- Communication: Plugins can trigger macros via vmAPI.dll SDK
- Best For: External application integration, custom functionality, advanced automation
- Examples: Web service integration, hardware monitoring, custom automation
10. Controller/Gamepad (UseController)
Trigger ID: 9 (ActivatedBy = 9)
- Description: Gamepad, joystick, or controller button activation
- Setup: Check "Controller" in macro editor, click "Set Controller" to configure
- Supported: All controller buttons, axes, POV hats, multiple controllers simultaneously
- Click Types: Single, double, triple-click detection
- Trigger Modes: Press (when button is pressed), Down (when button is pressed down), Up (when button is released)
- Modifier Buttons: Controller buttons can act as modifiers for expanded functionality
- Best For: Gaming, accessibility, hands-free operation, custom controller functions
- Examples: Gaming macros, accessibility controls, custom controller functions
11. Remote Control (HTTP)
Trigger ID: 10 (ActivatedBy = 10)
- Description: HTTP-based remote control from external devices
- Setup: Enable Remote Control in VoiceMacro settings, configure IP/port
- Requirements: Remote Control enabled, network access, HTTP requests
- Supported Commands: Same as command line arguments via HTTP requests
- Access Methods: Web browser, mobile apps, custom HTTP clients
- Security: Local network access, configurable IP binding
- Best For: Mobile device control, remote automation, web integration
- Examples: Smartphone control, tablet interfaces, remote monitoring
Trigger Detection and Variables
VoiceMacro provides the {ActivatedBy}
variable to detect which trigger mechanism activated a macro:
- 0: Voice command
- 1: Keyboard/Mouse hotkey
- 2: Other macro
- 3: Testing
- 4: Auto (profile switch)
- 5: Command line
- 6: Scheduler
- 7: AutoEx (profile switch away)
- 8: Plugin
- 9: Controller/Gamepad
- 10: Remote control
Multiple Trigger Types
A single macro can use multiple trigger types simultaneously. For example, a macro could be triggered by:
- Voice command "Open Notepad"
- Hotkey Ctrl+Alt+N
- Controller button X
- Daily scheduler at 9:00 AM
This provides maximum flexibility and accessibility for different use cases and users.
Trigger Priority and Conflicts
- No Priority: All trigger types have equal priority
- Simultaneous Triggers: Multiple triggers can activate the same macro simultaneously
- Conflict Resolution: VoiceMacro handles multiple simultaneous triggers gracefully
- Hotkey Conflicts: Check for system/global hotkey conflicts when using keyboard shortcuts
- Controller Conflicts: Ensure controller buttons aren't used by games or other applications
LLM Guidance for Trigger Selection
- Accessibility: Recommend voice commands and controller buttons for users with mobility limitations
- Gaming: Suggest controller buttons and hotkeys for gaming applications
- Productivity: Recommend hotkeys and scheduler for office automation
- Remote Access: Suggest remote control and command line for external automation
- Complex Automation: Recommend plugin integration and other macro triggers for advanced scenarios
- Testing: Always mention the Test button for debugging and verification
Advanced Features
- Loops: Use Loop Start and Loop End to repeat actions. ExitLoop and Continue control flow inside loops.
- Conditions: Use If, ElseIf, Else, and EndIf for conditional logic. Conditions can use variables, math, and string functions.
- Timeout Handling: OnTimeOut and EndOnTimeOut define actions to run if a timeout occurs in WaitForWindow/WaitForPixel.
- Goto/Label: Use Label and Goto for jumps within macros.
- Plugin Integration: SendToPlugin can send data to plugins (e.g., AskChatGPT).
- Profile/Macro State: SetState, Toggle, Rotate, and related actions manage macro states.
- Clipboard: Clipboard Copy and Clipboard Paste for automation.
- Dialogs & OSD: ShowDialog, ShowOSD, HideOSD for user feedback.
- Hotkey assignment: Assign macros to keyboard, mouse, or controller buttons, with options for click type and key action.
LLM Usage & Macro Generation Patterns
Note for LLMs: This documentation is intended for use by large language models to generate VoiceMacro macros in response to user requests. Use the patterns, samples, and guidance below to map user intent to macro code. Always prefer clarity, explicit action names, and variable usage for dynamic content. When in doubt, provide a short pause after launching applications or switching windows.
Critical: Always Provide UI Navigation Instructions
When a user asks you to help create a macro, you MUST provide both:
- Step-by-step UI navigation instructions (what buttons to click, menus to open, fields to fill)
- The actual macro code/actions (what the macro will do)
Never just provide macro code without UI instructions. Users need to know exactly how to create the macro in VoiceMacro's interface.
General LLM Macro Generation Guidance
- When a user asks for automation, break the task into explicit actions (Open, Pause, InsertText, Key, etc.).
- For window or application automation, always add a Pause after launching or switching windows.
- Use variables for any dynamic or user-supplied content.
- For loops, always use Loop Start/Loop End and provide a clear loop count or variable.
- For error handling, suggest using WriteToLog or ShowDialog for debugging.
- When a user asks for a hotkey, include the hotkey assignment in the macro structure.
- For plugin/API integration, use SendToPlugin with clear parameters.
- When a user reports an error, suggest common fixes (e.g., add Pause, check window title, run as admin).
LLM-Optimized Sample Macros
Each sample below includes a user prompt, the macro code, and LLM-specific guidance. Use these as templates for generating new macros. Array usage, advanced variable patterns, plugin integration, accessibility, and other features are integrated throughout.
Prompt: "Open Notepad, type 'Hello', and save the file as test.txt"
UI Navigation Instructions:
1. In main window, click 'Edit' (or press Alt+E)
2. In Profiles window, click 'Add New macro' (or press Alt+A)
3. In Macro Editor, click 'Other' menu (or press Alt+O)
4. Select 'Execute/open a file'
5. Click '...' button, browse to notepad.exe, click 'OK'
6. Click 'OK' to save action
7. Click 'Other' menu again, select 'Pause'
8. Enter 0.5, click 'OK'
9. Click 'Other' menu, select 'Insert text'
10. Enter "Hello", click 'OK'
11. Add another Pause (0.2 sec)
12. Click 'Other' menu, select 'Keyboard'
13. Press Ctrl+S, click 'OK'
14. Add Pause (0.2 sec)
15. Add InsertText action with "test.txt"
16. Add Keyboard action with Enter key
17. Click 'OK' to save macro
Macro Actions:
Action 1: Open "notepad.exe"
Action 2: Pause (0.5 sec)
Action 3: InsertText "Hello"
Action 4: Pause (0.2 sec)
Action 5: Key: Ctrl+S
Action 6: Pause (0.2 sec)
Action 7: InsertText "test.txt"
Action 8: Key: Enter
LLM Guidance: Always provide both UI navigation steps AND macro actions. Always add a pause after launching Notepad and before/after key actions. Use InsertText for file names and text input. Use Key: Ctrl+S to trigger save.
Prompt: "Store three numbers in an array and sum them"
UI Navigation Instructions:
1. In main window, click 'Edit' (or press Alt+E)
2. In Profiles window, click 'Add New macro' (or press Alt+A)
3. In Macro Editor, click 'Other' menu (or press Alt+O)
4. Select 'Set variable'
5. In Variable field, enter "MyArray"
6. In Value field, enter "1,2,3", click 'OK'
7. Click 'Other' menu again, select 'Set variable'
8. Variable: "ArrayLength", Value: "GETARRAY[MyArray, ","]", click 'OK'
9. Click 'Other' menu again, select 'Set variable'
10. Variable: "Sum", Value: "{MyArray1}+{MyArray2}+{MyArray3}", click 'OK'
11. Click 'Other' menu, select 'Write to log'
12. Enter "Array has {ArrayLength} elements, sum is {Sum}", click 'OK'
13. Click 'OK' to save macro
Macro Actions:
Action 1: SetVariable MyArray = 1,2,3
Action 2: SetVariable ArrayLength = GETARRAY[MyArray, ","]
Action 3: SetVariable Sum = {MyArray1}+{MyArray2}+{MyArray3}
Action 4: WriteToLog "Array has {ArrayLength} elements, sum is {Sum}"
LLM Guidance: Always provide both UI navigation steps AND macro actions. Use SetVariable to define arrays (comma-separated). Use GETARRAY[var,delimiter] to split into individual variables. Access elements with {VariableName1}, {VariableName2}, etc.
Prompt: "Loop through an array and type each value"
UI Navigation Instructions:
1. In main window, click 'Edit' (or press Alt+E)
2. In Profiles window, click 'Add New macro' (or press Alt+A)
3. In Macro Editor, click 'Other' menu (or press Alt+O)
4. Select 'Set variable'
5. Variable: "MyArray", Value: "apple,banana,cherry", click 'OK'
6. Click 'Other' menu again, select 'Set variable'
7. Variable: "ArrayLength", Value: "GETARRAY[MyArray, ","]", click 'OK'
8. Click 'Statements & conditions' menu (or press Alt+S)
9. Select 'Loop Start'
10. Enter "{ArrayLength}" for loop count, click 'OK'
11. Click 'Other' menu, select 'Insert text'
12. Enter "{MyArray{LoopIndex}}", click 'OK'
13. Click 'Other' menu, select 'Keyboard'
14. Press Enter key, click 'OK'
15. Click 'Statements & conditions' menu, select 'Loop End'
16. Click 'OK' to save macro
Macro Actions:
Action 1: SetVariable MyArray = apple,banana,cherry
Action 2: SetVariable ArrayLength = GETARRAY[MyArray, ","]
Action 3: Loop Start ({ArrayLength}x)
Action 4: InsertText "{MyArray{LoopIndex}}"
Action 5: Key: Enter
Action 6: Loop End
LLM Guidance: Always provide both UI navigation steps AND macro actions. Use GETARRAY[var,delimiter] to split array and get length. Use {VariableName{LoopIndex}} for dynamic array access.
Prompt: "Find the length of an array"
Macro:
Action 1: SetVariable MyArray = a,b,c,d,e
Action 2: SetVariable ArrayLength = GETARRAY[MyArray, ","]
Action 3: WriteToLog "Array length: {ArrayLength}"
LLM Guidance: Use GETARRAY[var,delimiter] to get the array length directly. This is much simpler than counting commas manually.
Prompt: "Mute system volume with a hotkey"
Macro:
Action 1: Key: Volume Mute
LLM Guidance: For system keys, use the appropriate key name (e.g., "Volume Mute", "Volume Down", "Volume Up", "Media Next Track", "Media Prev Track", "Media Stop", "Media Play Pause"). Assign this macro to a hotkey as requested by the user.
Prompt: "Wait for Calculator to open, then bring it to front and play a sound"
Macro:
Action 1: WaitWindow "Calculator", Timeout: 10 sec
Action 2: WindowToFront "Calculator"
Action 3: PlaySound "C:\alert.wav"
LLM Guidance: Use WaitWindow for synchronization. Always specify a timeout. Use PlaySound for user feedback.
Prompt: "Create a macro that loops 10 times, types the loop number, and presses Enter"
Macro:
Action 1: Loop Start (10x)
Action 2: InsertText "{LoopIndex}"
Action 3: Key: Enter
Action 4: Loop End
LLM Guidance: Use Loop Start/Loop End for repetition. Use variables like {LoopIndex} for dynamic content.
Prompt: "Speak the value of a variable from an array"
Macro:
Action 1: SetVariable Colors = red,green,blue
Action 2: SetVariable ArrayLength = GETARRAY[Colors, ","]
Action 3: SetVariable Index = 2
Action 4: SpeakText "The color at position {Index} is {Colors{Index}}"
LLM Guidance: Use GETARRAY[var,delimiter] to split the array first, then access elements with {VariableName{Index}}. Use variables for dynamic array access.
Prompt: "Replace all spaces in a string with underscores"
Macro:
Action 1: SetVariable MyText = "hello world test"
Action 2: SetVariable MyText = REPLACE[{MyText}," ","_"]
Action 3: InsertText "{MyText}"
LLM Guidance: Use REPLACE for string manipulation. Always enclose parameters in brackets and quotes as needed.
Prompt: "Send a command to a plugin and log the result"
Macro:
Action 1: SendToPlugin MyPlugin, Param1, Param2, Synch
Action 2: WriteToLog "Plugin executed successfully"
LLM Guidance: Use SendToPlugin for plugin/API calls. Use WriteToLog for debugging or user feedback. Most plugins don't return values to {PluginResult} - check the specific plugin documentation.
Prompt: "Work around a game that blocks simulated input"
Macro:
Action 1: Open "game.exe"
Action 2: Pause (2.0 sec)
Action 3: InsertText "{MyCommand}"
Action 4: Key: Enter
Action 5: WriteToLog "If input not received, try running VoiceMacro as administrator or use alternative input methods."
LLM Guidance: For games or apps that block input, suggest running VoiceMacro as admin, using InsertText instead of Key, or exploring plugin-based workarounds.
Prompt: "Accessibility: Assign a macro to a mouse button for hands-free operation"
Macro:
Action 1: SpeakText "Macro triggered by mouse button!"
Action 2: InsertText "Mouse macro activated"
LLM Guidance: Assign macros to mouse or controller buttons for accessibility. Use SpeakText for audible feedback.
Prompt: "Handle an error and provide user feedback"
Macro:
Action 1: If {ErrorLevel} <> 0
Action 2: ShowDialog "An error occurred: {ErrorLevel}"
Action 3: EndIf
LLM Guidance: Use ErrorLevel to detect issues. ShowDialog or WriteToLog can provide user feedback or debugging info.
Prompt: "Use a variable to store the result of a plugin call and use it in a condition"
Macro:
Action 1: SendToPlugin MyPlugin, Query, Synch
Action 2: SetVariable Result = "OK"
Action 3: If {Result} = "OK"
Action 4: SpeakText "Plugin succeeded!"
Action 5: Else
Action 6: SpeakText "Plugin failed: {Result}"
Action 7: EndIf
LLM Guidance: Store plugin results in variables for conditional logic and user feedback. Note: Most plugins don't return values to {PluginResult} - you may need to set the result variable manually based on the plugin's behavior.
Prompt: "Wait for a window to close before continuing"
Macro:
Action 1: WaitWindow "Notepad", Timeout: 30 sec
Action 2: OnTimeOut
Action 3: SpeakText "Notepad closed. Continuing."
Action 4: EndOnTimeOut
LLM Guidance: Use WaitWindow with timeout and OnTimeOut/EndOnTimeOut for window monitoring. This is more efficient than polling loops.
Prompt: "Advanced: Use math and string functions in SetVariable"
Macro:
Action 1: SetVariable MyText = "VoiceMacro is awesome!"
Action 2: SetVariable Upper = TOUPPER[{MyText}]
Action 3: SetVariable Count = STRLEN[{MyText}]
Action 4: WriteToLog "Upper: {Upper}, Length: {Count}"
LLM Guidance: Use TOUPPER, STRLEN, and other functions for advanced variable manipulation.
LLM Troubleshooting & Correction Patterns (Expanded)
- If a user reports "macro not working": Suggest adding Pause actions, checking window titles, running VoiceMacro as administrator, or using alternative input methods.
- If a user reports "plugin not responding": Suggest checking plugin installation, parameters, and using WriteToLog for debugging.
- If a user reports "window not found": Suggest verifying the window title, using partial matches, or increasing the timeout.
- If a user reports "macro too fast": Suggest increasing Pause durations between actions.
- If a user reports "hotkey conflict": Suggest changing the hotkey, using a different click type, or checking for system/global hotkey conflicts.
- If a user reports "input not received in a game": Suggest running as admin, using InsertText, or plugin-based workarounds.
- If a user reports "unexpected variable value": Suggest using WriteToLog or ShowDialog to inspect variable contents.
LLM Best Practices (Expanded)
- ALWAYS provide UI navigation instructions - Never just give macro code without telling users how to create it in the interface.
- For plugin integration, always specify plugin name, parameters, and handle results with variables and conditions.
- For accessibility, suggest assigning macros to mouse/controller buttons and providing audible feedback.
- For error handling, use ErrorLevel, WriteToLog, and ShowDialog for robust user feedback.
- For game/app-specific workarounds, suggest running as admin, using alternative input methods, or leveraging plugins.
- For advanced variable use, combine math, string, and array functions for dynamic macros.
- For window management, use WaitWindow with OnTimeOut/EndOnTimeOut for efficient window monitoring.
LLM Response Template
When a user asks for help creating a macro, use this template:
Your Response Structure:
1. UI Navigation Steps: "Here's how to create this macro in VoiceMacro:"
- Step-by-step instructions with specific buttons, menus, and fields
- Include hotkeys when available (e.g., "or press Alt+O")
2. Macro Actions: "The macro will perform these actions:"
- List the actual macro actions that will be created
3. Additional Tips: "Tips for this macro:"
- Any relevant best practices or troubleshooting advice
Remember: Users need to know HOW to create the macro in VoiceMacro's interface, not just what the macro does.
Best Practices
- Use descriptive macro and variable names.
- Test macros with simple actions before adding complexity.
- Document macros with comments for clarity.
- Avoid overlapping voice commands to prevent conflicts.
- Use variables and functions for dynamic, reusable macros.
- Leverage advanced features for powerful automation.
Troubleshooting
- Macro Not Triggering: Check microphone setup, voice command recognition, and trigger configuration. Also check hotkey assignment and conflicts.
- Action Fails: Verify window titles, file paths, and parameters are correct.
- Performance Issues: Reduce complex loops or excessive pauses.
- Debugging: Use WriteToLog and ShowDialog for feedback.
- Unexpected Results: Check variable values and logic in conditions.
- Hotkey/Shortcut Issues: Ensure no conflicts with system/global hotkeys. Try changing the hotkey or using a different click type.
- UI Navigation: Use Tab/Shift+Tab to move between fields. Most dialogs support keyboard navigation and shortcuts.
Advanced Features & System Behavior
VoiceMacro includes several advanced features and built-in protections for system stability.
Recursion Detection
VoiceMacro has built-in recursion detection to prevent system overload. If you accidentally create a macro that starts extremely frequently in a very short time, VoiceMacro will automatically terminate all macros to prevent system overload.
Emergency Abort
- Built-in Hotkey: SHIFT+ESC aborts all running macros
- Limitation: This default hotkey might not work in certain apps or games as it doesn't use the global hook method
- Workaround: Create your own hotkey that starts a macro which aborts all macros
Action Management
- Rearrange Actions: Press SHIFT while clicking "Up" or "Down" buttons to move actions to top or bottom
- Deactivate Actions: Press the "Active" button or space bar to toggle action activation (comment out actions)
- Context Menus: Right-click in the Actions gridview for additional functions
- Search: Use Ctrl+F to open search bar in grids
Auto and AutoEx Features
VoiceMacro can trigger macros automatically when profiles are switched:
- Auto: Macro executes when a profile is switched to
- AutoEx: Macro executes when a profile is switched away from
- Setup: Select a macro in the "Profiles and macros" window, then use "Auto" and "AutoEx" buttons to toggle
Multiple Trigger Types
Besides voice commands, hotkeys, and scheduler, VoiceMacro can trigger macros using:
- Command Line Arguments: External program communication
- Other Macros: RunOtherMacro action
- Remote Control: Network TCP/IP communication
- Plugins: Plugin integration via vmAPI
- Auto/AutoEx: Profile switching triggers
Advanced UI Features
- Show Hints: When activated, VoiceMacro randomly displays available voice commands in the status bar
- Tray Icon: Always show Tray Icon keeps it visible even when main window is open
- Stay on Top: Keep VoiceMacro window always visible
- Minimize Instead Close: Minimize to tray instead of closing
- Dark Mode: Enable dark theme for the interface
LLM Guidance for Advanced Features
- Recursion Prevention: Avoid creating macros that trigger themselves or create infinite loops
- Emergency Abort: Always provide users with a way to stop macros (custom abort hotkey)
- Profile Organization: Use Auto/AutoEx features for context-aware automation
- Action Management: Teach users how to deactivate actions for testing without deletion
- Multiple Triggers: Combine different trigger types for robust macro activation
Sample Macros & Community Tips
Below are real-world macro examples and tips inspired by the VoiceMacro Community Forum. These samples demonstrate practical uses, advanced features, and best practices. For more, visit the VoiceMacro Community Forum.
1. Open Notepad and Type Text
Description: Opens Notepad and types "Hello, World!"
Macro:
Action 1: Open "notepad.exe"
Action 2: Pause (0.5 sec)
Action 3: InsertText "Hello, World!"
Tip: Use a short pause to ensure Notepad is ready for input before typing.
2. Toggle Mute in Discord (Global Hotkey)
Description: Press a hotkey to mute/unmute Discord.
Macro:
Action 1: WindowToFront "Discord"
Action 2: Pause (0.2 sec)
Action 3: Key: Ctrl+Shift+M
Assign this macro to a global hotkey for quick access.
3. Loop: Auto-Clicker for Games
Description: Repeatedly clicks the left mouse button every 100ms.
Macro:
Action 1: Loop Start (50x)
Action 2: Mouse Click left
Action 3: Pause (0.1 sec)
Action 4: Loop End
Tip: Adjust the loop count and pause for your needs. Use a toggle variable to stop the loop early if needed.
4. Speak Current Time
Description: Speaks the current time using TTS.
Macro:
Action 1: SetVariable MyTime = {Time}
Action 2: SpeakText "The time is {MyTime}"
Tip: Use internal variables like {Time}, {Date}, or {CurrentWinTitle} for dynamic macros.
5. Wait for a Window, Then Take Action
Description: Waits for a window (e.g., Calculator) to appear, then brings it to front and plays a sound.
Macro:
Action 1: WaitWindow "Calculator", Timeout: 10 sec
Action 2: WindowToFront "Calculator"
Action 3: PlaySound "C:\alert.wav"
Tip: Use OnTimeOut/EndOnTimeOut to handle cases where the window does not appear.
6. Advanced: Use Variables and Math Functions
Description: Sets a random delay and types it.
Macro:
Action 1: SetVariable Delay = RANDOM 100-500
Action 2: Pause ({Delay} ms)
Action 3: InsertText "Waited {Delay} ms"
Tip: You can use math and string functions in SetVariable for powerful automation.
Community Tips
- Tip: If a macro isn't working, check the log with WriteToLog or ShowDialog for debugging.
- Tip: Use variables for dynamic content and to avoid hardcoding values.
- Tip: Assign macros to mouse or controller buttons for hands-free operation.
- Tip: Use the forum's search to find more samples and solutions to common problems.
- Common Pitfall: Some games/applications may block simulated input. Try running VoiceMacro as administrator or use alternative input methods.
- Array Tip: Use GETARRAY[var,delimiter] to split strings into arrays. VoiceMacro automatically creates individual variables (MyArray1, MyArray2, etc.) and returns the array length.
- Array Tip: Access array elements with {VariableName{Index}} syntax, where Index can be a variable or number.
- Array Tip: Use different delimiters (comma, semicolon, pipe) for different data types. GETARRAY supports any delimiter character.
Resources
Command Line Arguments
VoiceMacro supports command line arguments for external program communication. If VoiceMacro is already running, new command line arguments are sent to the already running instance.
Supported Commands
- /ExecuteMacro=ProfileGUID/MacroGUID - Execute macro using GUIDs
- /ExecuteMacro=ProfileName/MacroName - Execute macro using names
- /ExecuteMacro="Profile Name/Macro Name" - Execute macro with spaces in names
- /VoiceCommand="My Voice Command" - Execute macro by voice command
- /SetVariable:[ProfileGUID or Name,]MyVariable_[s/g/p]="value" - Set variables
- /GetVariable=[ProfileGUID or Name,]MyVariable_[s/g/p] - Get variable values
- /ShowWindow - Show VoiceMacro's main window
Command Line Examples
Execute macro by GUID:
VoiceMacro.exe /ExecuteMacro=414bb82f-12e0-427d-bf7c-712288d03142/28fdfdf2-1502-4bf0-9ace-d6649d921f32 /ShowWindow
Execute macro by name:
VoiceMacro.exe /ExecuteMacro="VoiceMacro demo profile/ActivatedBy"
Set global variable:
VoiceMacro.exe /SetVariable:Feedback1_g="This global variable has been changed externally!"
Set profile variable:
VoiceMacro.exe /SetVariable:"My Profile",Feedback1_p="This profile variable has been changed externally!"
Execute by voice command:
VoiceMacro.exe /VoiceCommand="whats the time"
LLM Guidance for Command Line Usage
- GUID Retrieval: Right-click in the actions list of Edit Macros window and choose "Copy profile/macro GUID's to clipboard"
- Multiple Arguments: You can have any arguments several times in the same command line - they are processed in order
- Case Insensitive: Commands are NOT case-sensitive
- Quotes: Use quotes for profile/macro names with spaces
- Variable Suffixes: Use _s (saved), _g (global), _p (profile), _l (local) for variable scope
Data Directory & File Structure
VoiceMacro uses a specific data directory structure for storing configuration, profiles, and resources.
Important Files
- VoiceMacroData.xml - Contains all your profiles and macros (backup regularly!)
- VoiceMacroConfig.xml - Contains VoiceMacro configuration (window positions, etc.)
- Variables_s.xml - Contains global saved variables (only exists if you've used saved variables)
Directory Structure
- Externals - For external scripts and files
- Sample-Profiles - Additional sample profiles for import
- HTMLExport - HTML export templates
- Sounds - Audio files for macros
- Plugins - Plugin files
Data Directory Location
- Setup Installation: C:\Users\YourUserName\AppData\Roaming\VoiceMacro\
- Portable Installation: Same directory as VoiceMacro.exe
- Access Method: Click the hamburger menu (☰) → "Show Data Directory..."
LLM Guidance for File Management
- Backup Strategy: Regularly backup VoiceMacroData.xml to avoid losing macros
- Portable Use: Use "Sounds" and "Externals" folders for easy sharing without path adjustments
- Update Process: Backup data files before updating VoiceMacro
- Profile Sharing: Export/import profiles for sharing between systems
Plugin SDK (vmAPI.dll)
VoiceMacro version 1.3 and above includes official plugin support and SDK for C#/VB.net development.
Plugin Development
- SDK Download: VoiceMacroPluginSDK_0.2.zip
- Requirements: Visual Studio 2015 or higher
- Language Support: C# and VB.net
- Integration: Plugins can trigger macros and extend VoiceMacro functionality
Plugin Installation
- Unzip SDK files in Visual Studio Projects folder
- Load the Solution file (VoiceMacroPluginSamples.sln)
- Change output path to VoiceMacro's Plugin folder
- Set vmAPI.dll reference to Plugins folder location
- Set "Copy Local" to "False" for vmAPI.dll reference
- Compile project and restart VoiceMacro
LLM Guidance for Plugin Integration
- Plugin Communication: Use SendToPlugin action to communicate with plugins
- Parameter Passing: Plugins can receive up to 3 parameters
- Synchronous Execution: Choose whether to wait for plugin completion
- Error Handling: Implement proper error handling for plugin failures
- Documentation: Check specific plugin documentation for usage details
Documentation generated and expanded by LLM using source code analysis. For the most up-to-date information, always refer to the latest VoiceMacro release and official website.
Latest Features & Current Capabilities
This section covers the most recent features and capabilities in VoiceMacro that may not be fully documented on the website yet. These features are current as of version 1.4.0.59.
Latest Version Updates (1.4.0.59 - June 11, 2025)
- WaitForPixel Fix: Fixed window picking color and coordinates that was accidentally disabled since version 1.4.0.45, improved behavior of right mouse dragging
- Crash Fixes: Fixed potential crashes in Add/Edit Macro window when bringing current action into view in datagrid
- ALT+E Fix: Fixed potential crash when using ALT+E to edit macro that could trigger twice trying to open an already open window
- Exception Handling: Fixed exceptions and added console debug output for potential issues when deleting macros and editing macros
Recent Version Updates (1.4.0.58 - April 30, 2025)
- Nested If Conditions Fix: Fixed issue where nested If conditions could cause parser to jump to incorrect EndIf, leading to unintended execution of Else or ElseIf blocks
- Scheduler Crash Fix: Fixed potential crash with Scheduler
Recent Version Updates (1.4.0.57 - March 22, 2025)
- Voice Command Parsing Fix: Fixed potential crash when parsing voice commands to match recognized phrase
- Profile Window Fixes: Fixed potential crashes when editing target window text and handling linked profiles
- RunOtherMacro Fix: Fixed potential crash when RunOtherMacro gets profile and macro name from another profile
- PlaySound Fix: Fixed potential crash in PlaySound action window when testing sound
- SetState Display Fix: Fixed potential crash with displaying SetState from another macro in another profile
Enhanced UI Features
- Dark Mode: Complete dark theme implementation with customizable colors and improved readability
- Stay on Top: Keep VoiceMacro window always visible above other applications
- Minimize Instead Close: Option to minimize to tray instead of closing the application
- Enhanced Tray Icon: Informative system tray icon with status indicators and quick access menu
- Improved Tooltips: Comprehensive help system with detailed explanations for all features
- Show App Directory: Added option in hamburger menu if VoiceMacro is installed within program files folder
- Word Wrap Log: Added word wrap option for the log in context menu
Advanced Controller Support
- Multiple Controllers: Support for multiple gamepads, joysticks, and input devices simultaneously
- Modifier Buttons: Controller buttons can act as modifiers (like Shift key) for expanded functionality
- Click Types: Single, double, and triple-click detection for controller buttons
- Button Mapping: Comprehensive mapping for all controller buttons, axes, and POV hats
- DirectInput Integration: Full DirectInput support for maximum compatibility
- Controller Remapping: New feature to remap controllers for custom configurations
Remote Control & Web Integration
- HTTP Remote Control: Control VoiceMacro from any device via HTTP requests
- HTML Export: Create custom web interfaces for remote control from smartphones/tablets
- Network Communication: TCP/IP-based remote control for local network access
- Web Server Integration: Compatible with web servers like Miniweb for external access
- Cross-Platform Control: Control VoiceMacro from any device with a web browser
- Localhost Support: Added support for binding to "localhost" in remote feature (no admin required)
- IPv4/IPv6 Handling: Added check for IPv4 and ignore IPv6 addresses for better compatibility
Plugin Architecture & SDK
- vmAPI.dll SDK: Official plugin development kit for C# and VB.net
- Plugin Loading: Automatic plugin detection and loading from Plugins folder
- Plugin Communication: SendToPlugin action for macro-to-plugin communication
- Parameter Passing: Support for up to 3 parameters per plugin call
- Synchronous Execution: Option to wait for plugin completion before continuing
- Plugin Development: Visual Studio templates and examples included
- Plugin Crash Handling: Improved plugin crash handling, now reports to log instead of showing crash handler
Enhanced Variable System
- Expanded Internal Variables: 60+ built-in variables for dynamic content
- Variable Scopes: Local, profile-wide, global, and global saved to disk
- Advanced Functions: Math, string manipulation, array handling, and random generation
- Dynamic Access: Variables can be used in most action parameters
- Persistence: Global saved variables persist between sessions
- New Variables: Added VMWindowState, CurrentExePath, LastRecognized, AudioDeviceName#, and more
- GETARRAY Function: New function to make arrays from lists separated with delimiters
- GETNUM Enhancement: Improved to handle different number formats and return ERR! if no numeric values found
- TRIM Functions: Added TRIM, LTRIM, and RTRIM string functions for SetVariable
Improved Speech Recognition
- Multiple Engines: Support for various SAPI5-compatible speech recognition engines
- Engine Switching: ChangeEngine action for dynamic engine selection
- Enhanced Training: Better integration with Windows Speech Recognition training
- Microphone Management: Automatic detection and configuration of multiple microphones
- Volume Monitoring: Real-time microphone input level monitoring
- Server API Support: Added support for alternative "server" speech recognizer API
- Advanced Settings: Added Advanced Recognizer Engine settings
Advanced Macro Features
- Recursion Detection: Built-in protection against infinite loops and macro recursion
- Emergency Abort: SHIFT+ESC hotkey and custom abort macros for safety
- Action Management: Deactivate actions without deletion for testing
- Step-by-Step Testing: Test macros action by action for debugging
- Recording Function: Real-time recording of mouse and keyboard actions
- Bulk Operations: Added bulk move macros to new group and bulk change group features
- Profile Locking: Added option to lock a Profile until executable is terminated
- Group Management: Added ability to temporarily disable groups at runtime via DisabledGroups variable
Profile & Organization Features
- Group Affixes: Organize macros in groups with prefixes and suffixes
- Profile Linking: Link profiles together for complex automation scenarios
- Auto/AutoEx Macros: Macros that execute when profiles are switched to/from
- Default/Global Profiles: Set default and global profiles for system-wide automation
- Profile Import/Export: Share and backup complete profile configurations
- Profile Locking: Lock profiles until executable is terminated
- Unsaved Changes Warning: Added warning dialog if user exits with unsaved changes
System Integration
- Command Line Interface: Full command line support for external program integration
- Windows Integration: Start with Windows, minimize on close, system tray integration
- Process Management: Kill process action for system administration
- Window Management: Advanced window manipulation, positioning, and styling
- File System Access: Direct file operations and path management
- Task Scheduler Integration: Improved startup behavior using Task Scheduler for admin rights
- DPI Scaling: Improved support for high DPI displays and scaling
UI & User Experience Improvements
- Dark Mode Colors: Fixed/improved dark mode colors for SetState and SetVariable windows
- Context Menu Performance: Speeded up context menu when creating and opening
- Log Performance: Improved log performance if log is spammed excessively
- Window Border Control: Added Window Border on/off/toggle to DisplayStyle action
- ShowUI Enhancements: Added option to group RadioButtons in ShowUI, PasswordChar property for TextBox controls
- WaitForPixel Improvements: Added Radius option, improved screenshot window, added hex color format display
Bug Fixes & Stability Improvements
- Crash Reporting: Fixed/Updated from TLS 1.0 to TLS 1.2 for sending crash reports
- Exception Handling: Improved exception handling throughout the application
- Memory Management: Fixed handle leaks and improved resource management
- Thread Safety: Improved thread safety for concurrent operations
- XML Handling: Improved XML file handling and error recovery
- Hotkey Stability: Fixed various hotkey and input handling issues
LLM Guidance for Latest Features
- Dark Mode: Mention dark mode option for users who prefer dark themes
- Controller Integration: Suggest controller buttons for accessibility and gaming
- Remote Control: Recommend HTML export for mobile device control
- Plugin Development: Guide users to SDK for custom functionality
- Advanced Variables: Encourage use of dynamic variables for complex automation
- Safety Features: Always mention recursion detection and emergency abort
- Profile Locking: Explain profile locking for security-sensitive automation
- Bulk Operations: Mention bulk group operations for efficient macro management
HTML Export Templates & Remote Control
VoiceMacro includes a powerful HTML Export feature that creates custom web interfaces for remote control. These HTML templates can be used to control VoiceMacro from any device with a web browser, including smartphones and tablets.
HTML Export Overview
- Purpose: Create custom web interfaces for remote control of VoiceMacro
- Location: HTMLExport folder in VoiceMacro installation directory
- Template Files: Must start with "VMhtmlExport" (case sensitive) to be recognized
- File Extension: Can be any extension (usually .html)
- Features: Responsive design, dark/light themes, fullscreen support, JavaScript integration
Template Structure & Placeholders
HTML Export templates use specific start/end tags and placeholders that VoiceMacro replaces with actual data:
Start/End Tags
<!-- VMALLGROUPS -->
/ <!-- /VMALLGROUPS -->
- Start/end of all groups
<!-- VMGROUPSTART -->
/ <!-- /VMGROUPSTART -->
- Start/end of individual groups
<!-- VMMACROS -->
/ <!-- /VMMACROS -->
- Start/end of macros section
<!-- VMGROUPEND -->
/ <!-- /VMGROUPEND -->
- Start/end of group endings
Global Placeholders (Replaced in whole HTML file)
$$PROFILENAME$$
- Profile Name
$$PROFILEGUID$$
- Profile GUID
Group Placeholders (Replaced in VMGROUPSTART/VMGROUPEND tags)
$$GROUP$$
- Group name
$$GROUPMACROCOUNT$$
- Number of macros in group
$$GROUPINDEX$$
- Index of group
Macro Placeholders (Replaced in VMMACROS tag)
$$COMMANDS$$
- Display name of the command
$$DESCRIPTION$$
- Description of the command
$$CMDSORDESC$$
- Display name or description if display name is empty
$$DESCORCMDS$$
- Description or display name if description is empty
$$ALLCOMMANDS$$
- All voice commands (including group affixes)
$$TRIGGERS$$
- All other triggers (voice commands excluded)
$$SHOWORHIDEALL$$
- "none" if single voice command, "inherit" if multiple
$$INDEX$$
- Index of current macro
$$MACROGUID$$
- GUID of the current macro
$$GROUPINDEX$$
- Index of current group
Included Template Examples
- VMhtmlExportDefaultTemplate.html - Basic template with simple button layout
- VMhtmlExportDefaultTemplateDark.html - Dark theme version of basic template
- VMhtmlExportDefaultWithExecute.html - Template with execute functionality
- VMhtmlExportDefaultWithExecuteDark.html - Dark theme with execute functionality
- VMhtmlExportSampleTabs.html - Advanced template with tabbed interface
- VMhtmlExportSampleAccordeonStyle.html - Accordion-style collapsible interface
Creating Custom HTML Templates
Basic Template Example:
<!DOCTYPE html>
<html>
<head>
<title>$$PROFILENAME$$</title>
</head>
<body>
<h1>$$PROFILENAME$$</h1>
<!-- VMALLGROUPS -->
<!-- VMGROUPSTART -->
<h2>$$GROUP$$</h2>
<!-- VMMACROS -->
<button onclick="executeMacro('$$MACROGUID$$')">$$COMMANDS$$</button>
<!-- /VMMACROS -->
<!-- VMGROUPEND -->
<!-- /VMALLGROUPS -->
</body>
</html>
JavaScript Integration for Remote Control
HTML templates can include JavaScript functions to communicate with VoiceMacro's remote control feature:
JavaScript Function for Remote Control:
function VMhttpGet(theUrl, callbackElement) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
callbackElement.innerHTML = xmlHttp.responseText;
}
}
xmlHttp.open("GET", theUrl, true);
xmlHttp.send(null);
}
Remote Control Features
VoiceMacro's remote control feature allows external devices to control VoiceMacro via HTTP requests over the network.
Remote Control Setup
- Enable Remote Control: In VoiceMacro main menu → Remote Control → Enable
- Configure IP/Port: Set IP address and port (default: *:8080)
- Network Access: Ensure firewall allows connections to the specified port
- Security: Remote control is designed for local network use
HTTP Commands
Remote control uses HTTP GET requests with specific command parameters:
/ExecuteMacro=ProfileGUID/MacroGUID
- Execute macro by GUIDs
/ExecuteMacro=ProfileName/MacroName
- Execute macro by names
/VoiceCommand="My Voice Command"
- Execute by voice command
/SetVariable:MyVariable_g="value"
- Set global variable
/SetVariable:ProfileName,MyVariable_p="value"
- Set profile variable
/GetVariable=MyVariable_g
- Get variable value
/ShowWindow
- Show VoiceMacro's main window
VMRemote Command Line Tool
VMRemote.exe is a command-line tool for remote control from batch files and scripts.
- Location: Externals/Remote/VMRemote/VMRemote.exe
- Usage:
VMRemote.exe [IP:Port] [Command]
- Examples:
VMRemote.exe 192.168.1.100:8080 /ShowWindow
VMRemote.exe 192.168.1.100:8080 /ExecuteMacro=ProfileName/MacroName
VMRemote.exe 192.168.1.100:8080 /SetVariable:MyVar_g="Hello World"
- Return Values: Tool returns success/failure status for automation scripts
PowerShell Integration
PowerShell Example - Execute Macro:
$RemoteHost = "192.168.0.10:8080"
$WebResponse = Invoke-Webrequest -Uri "http://$RemoteHost/ExecuteMacro=ProfileGUID/MacroGUID /ShowWindow"
echo $WebResponse.Content
PowerShell Example - Set and Get Variables:
$RemoteHost = "192.168.0.10:8080"
# Set variable
$WebResponse = Invoke-Webrequest -Uri "http://$RemoteHost/SetVariable:MyVariable_g=`"Hello, World!`""
# Get variable
$WebResponse = Invoke-Webrequest -Uri "http://$RemoteHost/GetVariable=MyVariable_g"
echo $WebResponse.Content
Web Browser Integration
HTML templates can include JavaScript to control VoiceMacro directly from web browsers:
JavaScript Remote Control Example:
function executeMacro(macroGUID) {
var ipAddress = document.getElementById('ipAddrPort').value;
var url = 'http://' + ipAddress + '/ExecuteMacro=ProfileGUID/' + macroGUID;
VMhttpGet(url, 'resultDiv');
}
Mobile Device Control
- Smartphone Access: Use HTML templates on mobile browsers
- Tablet Control: Responsive templates work on tablets
- Touch Interface: Large buttons and touch-friendly design
- Offline Capability: HTML files can be saved locally
Advanced Remote Control Features
- Multiple Commands: Chain multiple commands in single request
- Variable Management: Set and retrieve variables remotely
- Status Monitoring: Check VoiceMacro status and variables
- Cross-Platform: Works from any device with HTTP capability
- Custom Interfaces: Create specialized control panels
Security Considerations
- Local Network: Remote control is designed for local network use
- Firewall Configuration: Ensure proper firewall rules
- IP Binding: Configure specific IP addresses if needed
- Access Control: Consider network security for sensitive environments
LLM Guidance for Remote Control
- Template Creation: Guide users to create custom HTML templates for specific use cases
- Mobile Integration: Suggest responsive design for mobile device control
- Automation Scripts: Help users create batch files and PowerShell scripts
- Network Setup: Provide guidance on IP configuration and firewall settings
- Security Best Practices: Recommend local network use and proper access controls
- Custom Interfaces: Assist with creating specialized control panels for specific applications
VoiceMacro includes several external tools and integration options for advanced automation scenarios.
External Tools Location
External tools are located in the Externals
folder and include:
- VMRemote: Command-line remote control tool
- Joystick_to_VM.ahk: AutoHotKey script for joystick integration
- SetGamma.exe: Command-line gamma adjustment tool
- ErrorLevelTest.bat: Batch file demonstrating error level handling
- AdvancedErrorLevel.bat: Advanced error level demonstration
- vmTranslator: Profile translation tool
Joystick/Controller Integration
- AutoHotKey Script:
Joystick_to_VM.ahk
polls joystick/controller buttons
- Command Line Interface: Sends button events to VoiceMacro via command line
- Customizable: Define which buttons to poll for lightweight operation
- Compiled Version: Available as executable for systems without AutoHotKey
- Demo Profile: "Joystick Demo" profile demonstrates integration
Error Level Handling
- ErrorLevelTest.bat: Demonstrates processing return codes from file operations
- AdvancedErrorLevel.bat: Shows returning values from -21474 to 21474
- Integration: Use with "Open file" action for advanced error handling
- Demo Macros: See 'ErrorLevel' and '2 values in ErrorLevel' macros in demo profile
Profile Translation
- vmTranslator Tool: Translate exported profiles using Google Translate
- Multi-language Support: Convert profiles between different languages
- Documentation: See VoiceMacro documentation for translation guide
Sample Profiles
Additional sample profiles demonstrate advanced features:
- Alarm Clock: Voice-controlled alarm clock with scheduling
- Joystick Demo: Controller integration with external tools
- Conversation Sample: Two-way communication with timeout handling
- Protected Mode: Registry setting for point-of-sale scenarios
LLM Guidance for External Tools
- Controller Integration: Guide users through joystick/controller setup
- Error Handling: Help implement robust error level processing
- Translation: Assist with profile translation for international users
- Custom Tools: Support creation of specialized external tools
- Sample Analysis: Help users understand and modify sample profiles
Additional Components & Tools
VoiceMacro includes several additional components and tools for advanced functionality and integration.
Plugin System (vmAPI)
- Location: Plugins/vmAPI.dll
- Purpose: Plugin architecture for extending VoiceMacro functionality
- Documentation: vmAPI.xml contains API documentation
- Development: Allows third-party developers to create custom plugins
- Integration: Plugins can add new actions, triggers, and functionality
Sound System
- Location: Sounds/
- Purpose: Centralized sound file storage for profile sharing
- Included Sounds: Notice.mp3 (used in demo profile and Alarm Clock sample)
- Custom Sounds: Users can add their own sound files for easy profile sharing
- Usage: Reference sounds in "Play audio file" actions using relative paths
VMRemote Command Line Tool
- Location: Externals/Remote/VMRemote/VMRemote.exe
- Legacy Version: Externals/Remote/VMRemote/.net3.5/VMRemote.exe
- Compatibility: .NET 3.5 version for older systems
- Usage: Both versions provide identical functionality
- Purpose: Command-line remote control from batch files and scripts
Translation Tools
- vmTranslator: Externals/vmTranslator/vmTranslator.exe
- Dependencies: Newtonsoft.Json.dll for JSON processing
- Functionality: Translate VoiceMacro profiles between languages
- Integration: Uses Google Translate API for language conversion
- Output: Creates translated versions of exported profiles
Release Structure
The VoiceMacro release package includes the following directories and files:
- Externals/ - External tools and scripts (Remote, vmTranslator, etc.)
- HTMLExport/ - HTML export templates and CSS files
- Plugins/ - Plugin system and vmAPI
- Sample-Profiles/ - Example profiles for learning and testing
- Sounds/ - Audio files for profiles
- VoiceMacro.exe - Main application executable
- Various DLLs - Required libraries (GlobalHook.dll, SharpDX.dll, etc.)
LLM Guidance for Additional Components
- Plugin Development: Guide users through vmAPI for custom plugin creation
- Sound Integration: Help users add custom sounds to profiles
- Remote Control: Assist with VMRemote command-line tool usage
- Translation Support: Help international users with profile translation
- Legacy Support: Guide users with older system compatibility issues
- Sample Profiles: Help users understand and modify included sample profiles
Installation & Portability
VoiceMacro's behavior varies depending on installation location and Windows privileges, affecting data storage and functionality.
Data Directory Behavior
VoiceMacro uses different data directory locations based on installation method:
- Program Files Installation: Data stored in separate user directory (e.g.,
%APPDATA%\VoiceMacro\
)
- Portable Installation: Data stored alongside executable in same directory
- Admin vs User Mode: Different privilege levels affect certain actions
Portability Features
- Self-Contained: VoiceMacro can run from any directory without installation
- Speech Recognition Dependency: Requires Windows Speech Recognition for voice features
- Graceful Degradation: Runs without speech recognition (voice features disabled)
- Profile Portability: Profiles and settings travel with the application
- USB/Network Ready: Can run from USB drives or network locations
Windows Privilege Considerations
Certain VoiceMacro actions require elevated privileges to function properly:
- Admin Mode Required:
- Block Input actions
- System-wide hotkey registration
- Certain window manipulation actions
- Process termination (Kill Process)
- System tray modifications
- User Mode Limitations:
- Some actions may fail silently
- Limited system-wide control
- Restricted process management
- UAC prompts may appear
- Workarounds:
- Run as Administrator for full functionality
- Use alternative actions that don't require admin rights
- Configure UAC settings for specific applications
Installation Scenarios
- Standard Installation (Program Files):
- Data stored in user profile directory
- Requires admin rights for installation
- Updates require admin privileges
- Multiple users can have separate settings
- Portable Installation (Any Directory):
- Data stored with executable
- No installation required
- Can run from USB drives
- Settings travel with application
- Network Installation:
- Can run from network shares
- Shared profiles across multiple machines
- Requires network access permissions
Speech Recognition Requirements
- Windows Speech Recognition: Required for voice command functionality
- Language Packs: Must match system language for best recognition
- Microphone Setup: Proper microphone configuration required
- Fallback Behavior: Application runs without voice features if speech recognition unavailable
- Alternative Input: Hotkeys, mouse, and controller input still work
LLM Guidance for Installation Issues
- Data Location: Help users locate their VoiceMacro data directory
- Privilege Problems: Guide users through admin vs user mode issues
- Portable Setup: Assist with portable installation configuration
- Speech Recognition: Help troubleshoot voice recognition setup
- Action Failures: Explain why certain actions fail without admin rights
- Alternative Solutions: Suggest workarounds for privilege-restricted actions
Debugging Considerations
When helping users debug macro issues, consider these common limitations and their effects on macro behavior.
Privilege-Related Debugging Issues
- Silent Failures: Some actions fail without error messages when run without admin rights
- Block Input Actions: May appear to work but have no effect in user mode
- Hotkey Registration: System-wide hotkeys may not register properly
- Process Management: Kill Process actions may fail silently
- Window Manipulation: Certain window operations may be restricted
Installation Location Debugging
- Data Directory Confusion: Users may look for profiles in wrong location
- Portable vs Installed: Different behavior between installation types
- Profile Loading Issues: Profiles may not load from expected location
- Settings Persistence: Settings may not save in expected location
Speech Recognition Debugging
- Voice Commands Not Working: Check if speech recognition is properly configured
- Microphone Issues: Verify microphone is set as default input device
- Language Mismatch: Speech recognition language must match system language
- Recognition Accuracy: Background noise or poor microphone quality affects recognition
- Fallback Behavior: Application continues without voice features if speech recognition unavailable
Common Debugging Questions
When users report macro issues, ask these questions:
- Installation Type: "Is VoiceMacro installed in Program Files or running as portable?"
- Admin Rights: "Are you running VoiceMacro as Administrator?"
- Speech Recognition: "Is Windows Speech Recognition working and properly configured?"
- Action Type: "What specific action is failing? (Block Input, Kill Process, etc.)"
- Error Messages: "Are you seeing any error messages or just silent failures?"
- Data Location: "Where are your VoiceMacro profiles stored?"
Debugging Strategies
- Test with Admin Rights: Temporarily run as Administrator to isolate privilege issues
- Check Action Logs: Use "Write to Log" actions to track macro execution
- Verify Speech Recognition: Test voice commands in Windows Speech Recognition first
- Test Individual Actions: Create simple macros to test specific actions
- Check Data Directory: Verify profiles are loading from correct location
- Alternative Actions: Suggest alternative actions that don't require admin rights
LLM Debugging Guidance
- Privilege Issues: Always consider admin rights when actions fail silently
- Installation Context: Ask about installation type to understand data location
- Speech Recognition: Guide users through speech recognition troubleshooting
- Action-Specific Debugging: Provide targeted help based on failing action type
- Workaround Suggestions: Offer alternative approaches for restricted actions
- System Requirements: Verify Windows version and speech recognition availability
Debugging Actions & Tools
VoiceMacro provides several built-in actions specifically designed for debugging and troubleshooting macros.
Write to Log
- Purpose: Output text to VoiceMacro's log file for debugging
- Usage: Add at key points in macro to track execution flow
- Output Location: VoiceMacro log file (accessible via main menu)
- Content: Can include variables, timestamps, and custom messages
- Examples:
- Log variable values:
Write to Log: "Variable MyVar = {MyVar}"
- Track execution:
Write to Log: "Starting macro execution"
- Debug conditions:
Write to Log: "Condition check: {WinTitle} contains 'Notepad'"
Show Dialog
- Purpose: Display popup dialog boxes for user interaction and debugging
- Types: Information, Warning, Error, Question dialogs
- Usage: Pause macro execution and show information to user
- Debugging Applications:
- Show variable values:
Show Dialog: "Current value: {MyVariable}"
- Confirm actions:
Show Dialog: "About to execute action. Continue?"
- Display errors:
Show Dialog: "Error: Action failed at step 3"
- User input:
Show Dialog: "Enter value:" (with input field)
Speak Text
- Purpose: Use text-to-speech to provide audio feedback
- Advantages: Works even when screen is not visible or user is away
- Debugging Uses:
- Audio confirmation:
Speak Text: "Macro completed successfully"
- Error notification:
Speak Text: "Error occurred in step 2"
- Progress updates:
Speak Text: "Processing item {LoopIndex} of {TotalItems}"
- Variable values:
Speak Text: "Current value is {MyVariable}"
OSD (On-Screen Display)
- Purpose: Display temporary text overlay on screen
- Features: Customizable position, duration, and appearance
- Debugging Applications:
- Show progress:
OSD: "Step 3 of 5: Processing..."
- Display variables:
OSD: "Value: {MyVar}" (2 seconds)
- Status updates:
OSD: "Waiting for window..."
- Error messages:
OSD: "Error: Window not found" (5 seconds)
Pause
- Purpose: Temporarily halt macro execution
- Debugging Uses:
- Slow down execution for observation
- Allow time for external processes to complete
- Create breakpoints in macro flow
- Wait for user to observe screen changes
Debugging Strategies with Built-in Actions
- Macro Flow Tracking:
- Add
Write to Log
at start of each major section
- Use
OSD
to show current step visually
- Include
Speak Text
for audio confirmation
- Variable Monitoring:
- Log variable values before and after changes
- Use
Show Dialog
to inspect variables interactively
- Display variables with
OSD
for real-time monitoring
- Condition Testing:
- Log condition results with
Write to Log
- Show condition status with
OSD
- Use
Show Dialog
to confirm condition evaluation
- Error Handling:
- Add
Write to Log
before potentially failing actions
- Use
Show Dialog
to display error messages
- Include
Speak Text
for audio error alerts
Advanced Debugging Techniques
- Conditional Debugging:
- Use If/Else conditions to show different debug info
- Create debug-only sections with conditional execution
- Log different information based on variable states
- Loop Debugging:
- Log loop index and progress with
Write to Log
- Show loop progress with
OSD
- Use
Speak Text
for audio loop progress
- Performance Monitoring:
- Log execution time between actions
- Track number of iterations in loops
- Monitor memory usage and system resources
LLM Guidance for Debugging Actions
- Action Selection: Recommend appropriate debugging actions based on issue type
- Log Analysis: Help users interpret log output and identify patterns
- Variable Tracking: Guide users in monitoring variable values throughout execution
- Error Isolation: Help users isolate failing actions using debugging tools
- Performance Issues: Assist with identifying performance bottlenecks using timing logs
- User Feedback: Suggest appropriate user notification methods (visual, audio, log)
Documentation generated and expanded by LLM using source code analysis. For the most up-to-date information, always refer to the latest VoiceMacro release and official website.