Re: My Voice Controller Documentation

Downloads, Revision History, Information, Documentation

Re: My Voice Controller Documentation

Postby mbarrett » Mon Nov 03, 2008 2:01 pm

Created by Mike Barrett at 5 Hyphen Studios, Inc. on 6/15/08.

Download & Revision History

About
    My Voice Controller(MVC) allows you to emulate mouse and keyboard inputs by using your voice. Common uses for this software are gaming and assistance for the disabled/injured. I wrote this program to assist me with playing various games including World of Warcraft. MVC is free and the source code is available.

Prerequisites


Usage

Program startup

    Voice are stored in a plain text file called voice profiles. Upon the program launch your last profile will automatically be loaded and activated. The Microsoft speech recognition program should launch automatically. You will need to set the speech recognition software into listen mode by saying "start listening" or by clicking on the blue microphone button.

    Image

Profile setup

    Until the profile editor is created you will need to modify your profile in any text editor such as notepad. Refer to default.txt and priest.txt for examples

    Below is an example of the file format:

      #test
      !FORMAT=|(:)
      {heal}|(sendkey:4)(sendkey:5)(sendkey:6)
      renew|(sendkey:2)
      heal|(macro:heal)
      move ahead|(keydown:up)(delay:1000)(keyup:up)
      move mouse|(mousemove:500,500)

    There are 3 types of lines:
    • COMMENTS
      • Comments start with #
    • COMMANDS
      • Start with the voice trigger followed by commands and actions
      • Voice trigger and commands are separated by |
      • Commands and actions are separated by TABS or user defined seperators
    • PROGRAM SETTINGS
      • Change the way MVC behaves

    Line items are separated by TABS (old format) or by user defined characters.
    Old Format:
      Image
    New Format:
      If the first line of the voice profile = "!FORMAT=XXXX" then user defined characters will be recognized.
      In the below example Voice Triggers and Commands are separated by "|", Command actions are separated by "(:)".
        !FORMAT=|(:)
        {heal}|(sendkey:4)(sendkey:5)(sendkey:6)

Commands
    KEYBOARD
    • SENDKEY, SENDKEYAI
      • Sends a single key
      • SENDKEYAI uses AutoIt3 for sending keys
      • Examples
        • (SENDKEY:A)
        • (Sendkey:left)
        • (SendkeyAI:left)
        • (Sendkey:C)
        • Press b|(Sendkey:b)
    • KEYDOWN, KEYUP, KEYDOWNAI, KEYUPAI
      • Keeps a single key held down/up
      • KEYDOWNAI, KEYUPAI uses AutoIt3 for sending keys
      • Example
        • (Keydown:shift)
        • (Keyup:shift)
        • (KeydownAI:shift)
        • (KeyupAI:shift)
    • SENDTEXT, SENDTEXTAI
      • Sends more than one key or key combinations such as CTRL,ALT,SHIFT
      • SENDTEXTAI uses AutoIt3 for sending keys
      • Example
        • (Sendtext:Hello)
        • (SendtextAI:Hello)
        • (Sendtext:^%r)
        • (SendtextAI:^!r)

      • Certain characters are reserved. See this link for more information
      • You may also press multiple modifier keys such as SHIFT,CTRL,ALT
          % = ALT, ^ = CTRL, + = shift
      • Example to send SHIFT + CTRL + R
        • (Sendtext:+^R)

      NOTE: Special key commands are located in a file called KEYS.DAT that is located in your application directory

    MOUSE
    • MOUSECLICK, MOUSECLICKAI
      • Sends a single mouse click
      • MOUSECLICKAI uses AutoIt3 for sending mouse clicks
      • Examples
        • (Mouseclick:left)
        • (Mouseclick:right)
        • (Mouseclick:middle)
        • (MouseclickAI:left)
    • MOUSEDOWN, MOUSEUP, MOUSEDOWNAI, MOUSEUPAI
      • Presses the mouse button and keeps it held down/up.
      • MOUSEDOWNAI,MOUSEUPAI uses AutoIt3 for sending mouse clicks
      • Examples
        • (Mousedown:left)
        • (Mousedown:right)
        • (Mouseup:middle)
        • (MousedownAI:left)
    • MOUSEMOVE, MOUSEMOVEAI
      • Moves the mouse cursor to a set of X/Y coordinates on the screen. You can use my voice controller to show you the current coordinates of your mouse.
      • MOUSEMOVEAI uses AutoIt3 for sending mouse moves
      • Examples
        • (Mousemove:100,1000)
    • MOUSE LOAD/SAVE, MOUSEAI, MOUSESAVE, MOUSELOAD
      • When the MOUSE SAVE command is given the current mouse cursor coordinates will be stored in memory. When the MOUSE LOAD command is given the mouse will be moved to the saved coordinates. MOUSESAVE, MOUSELOAD - Allows saving/loading upto 100 mouse coordinates that are stored between sessions.
      • MOUSEAI uses AutoIt3 for sending mouse moves
      • Examples.
        • (Mouse:save)
        • (Mouse:load)
        • (MouseAI:save)
        • (MouseAI:load)
        • save mouse twenty|(mousesave:20)
        • load mouse twenty|(mouseload:20)
    • MOUSEOFFSET
      • Adds/Subtracts X,Y from all mouse position commands. Useful for screen resolution changes or window moves.
      • Example.
        • set offset|(MOUSEOFFSET:150,400)
    • MOUSEADD, MOUSEADDAI
      • Adds/Subtracts X,Y from all mouse position commands. Useful for screen resolution changes or wow window moves.
      • MOUSEAI uses AutoIt3 for sending mouse commands
      • Examples.
        • (mouseadd:100,200)
        • (mouseaddAI:100,200)

A Note about AutoIt3

MACROS

  • MACRO
    • Macros allow you to enter a string of commands once and refer to them with a shortcut. These are useful for commands that may change in the future.
    • To set up a macro you need to place brackets {} around the macro name. The macro name is placed at the beginning of the line. Commands and actions follow the |
      • Example
        • {HEAL ME}|(sendkey:F1)(sendkey:4)
    • To reference the macro all you need to do is referred to it by MACRO and the macro name without the brackets {}
      • Example
        • heal|(macro:heal me)

SPECIAL COMMANDS
  • DELAY
    • Inserts a pause in milliseconds. (1000=1 second)
    • Example
      • (Delay:500)
  • REPEAT
    • Repeats all previous commands X amount of times.
      • Example
          repeat me|(delay:100)(repeat:5)

  • LOADPROFILE
    • Loads a voice profile.
      • Example
          switch to browser commands|(LOADPROFILE:browser.mvc)

  • RUNEXTERNAL
    • Allows launching external programs/files.
      • Example
          Display Priest File|(RUNEXTERNAL:priest.txt)
          Run Notepad|(RUNEXTERNAL:c:\windows\notepad.exe "c:\tmp\dxdiag.txt")

  • SPEAK
    • Allows text to speech
      • Example
          say hello|(SPEAK:hello my voice commander)
    • The clipboard contents can also be spoken.
      • Example
          say clipboard contents|(SPEAK:clipboard)
  • WEBBROWSER
    • Opens a web browser window with the selected URL. This is useful for voice recognition on flash games where you don't want browser controlls interfering with your game.
      • Example
          launch castle wars|(webbrowser:www.kongregate.com/games/m0rkeulv/castlewars)


FOCUS COMMANDS
    The focus commands are intended to activate an existing window for you to send input commands.

    I’ve had several requests from users that run multiple windows of the same game at a time and wish to send input to multiple windows. It’s referred to as dual-boxing or multi-boxing. The method I’ve implemented will work if they run multiple windows of the same game on the same machine.

    There is a new focus grid tab for assigning the focus windows. Click on the focus tab and then assign a window to a focus line. There are three columns in this grid:

    • Assign – When you push this button you will have 5 seconds to bring the window you wish to receive focus.

    • Window Name – This field will automatically be filled in after pushing the set focus button. This is the title of the window. Note: many window programs change their titles often so this is best used for programs that do not change their title.
    • Handle – Every time a program is opened it is assigned a unique handle ID. This ID will change every time the program is launched. If you plan on running multiple windows with the same title you will need to reset the focus every time you launch them.
    Image

    There are three focus commands at this time:
  • FOCUSWINDOW
      Brings an existing window to the foreground. You must use the exact window title for this to work. Programs that often change their title are better suited for FOCUSWINDOWNUM. This command does not use the focus grid.

        For example: You want to send commands to a new word document and notepad.
        Hello word|(FOCUSWINDOW:Document1 – Microsoft Word)(SENDTEXT:hello)
        Hello notepad|(FOCUSWINDOW:Untitled – Notepad) (SENDTEXT:hello)
  • FOCUSWINDOWNAME
      Brings a pre-set existing window to the foreground using the window's name. This command works the same way as FOCUSWINDOW except that it uses the focus grid.

        For example:You want to send commands to VNC Master and Guardian
        Connect VNC|(FOCUSWINDOWNAME:1)(SENDTEXT:^C)
        Check Guardian|(FOCUSWINDOWNAME:4)(SENDTEXT:%C)
  • FOCUSWINDOWNUM
      Brings a pre-set existing window to the foreground using the window's handle. This command uses the handle ID from the focus grid. This is needed when the window title of multiple windows are the same. Note: the handle number will change every time you start the focused program so you will need to reassign it every session.

        For example: You want to send commands to two World of Warcraft windows you have open. For this example I have a priest character on the second focus window and a Mage character on the third focus window.
        Heal one|(FOCUSWINDOWNUM:2) (MACRO:self)(MACRO:heal)
        fireball||(FOCUSWINDOWNUM:3) (sendtext:2)

SPECIAL VOICE COMMANDS

    Special voice commands may be enabled/disabled and the voice triggers changed. Changes can be made in the options menu.
    NOTE: These commands are to be spoken.
    • REPEAT, AGAIN, REPEAT TWO..TWENTY FIVE
      • Repeats the last spoken command
    • CONTROLLER ON, CONTROLLER OFF
      • Accept/Ignore voice commands.
    • SHOW COMMANDS
      • Opens a window displaying all voice commands that are recognized.
    • STOP COMMAND
      • Stops a long sequence of actions from completing.

SETTINGS

  • IMPORT
    • Adds a profile to the existing profile. This is useful if you have one main profile with generic commands available for all your profiles and several other profiles that you switch between often. NOTE: commands and macros in the imported file will overwrite any commands and macros that exist in the main profile. Also the imported profiles must be in the same directory as the main profile.
      Note, imported profiles must be in the same format as the main profile.
    • Example:
        [IMPORT]|priest - healbot.txt
  • FORMAT
    • If the first line of the voice profile = "!FORMAT=XXXX" then user defined characters will be recognized.
      In the below example Voice Triggers and Commands are separated by "|", Command actions are separated by "(:)".
    • Example:
        !FORMAT=|(:)
        !FORMAT=:[@]

MVC Features
PUSH TO TALK (PTT)

Source code
The software is programmed in Microsoft visual basic 2008. I am releasing the source code so that others may learn and adapt the software. Because of the constant threat of key loggers and Trojans in programs related to online gaming I've made the source available for anyone to review and recompile. This software does not contain any malicious agenda such as keys loggers, Trojans or viruses. The Microsoft visual basic 2008 developer software is freely available from Microsoft (http://www.microsoft.com/express/vb/).

Source code is available upon request. Please send a PM to mbarrett asking for the source and a reason for your interest in the source code.

The source code may not be sold or distributed without the express written agreement from 5 Hyphen Studios. The source code remains property of Mike Barrett at 5 Hyphen Studios.
mbarrett
Developer
 
Posts: 182
Joined: Mon Mar 07, 2005 7:09 pm

Return to Product Information & Downloads

Who is online

Users browsing this forum: No registered users and 1 guest

cron