Results 1 to 8 of 8

Thread: ControlSend() solved my native iGuidance voice control woes

  1. #1
    Low Bitrate
    Join Date
    Jun 2006
    Location
    DuPont, WA
    Posts
    72

    ControlSend() solved my native iGuidance voice control woes

    I had strange problems trying to send key strokes to control native IGv3. It was very hit and miss, and one computer worked better than another, even though they supposedly had the same software running. This is in combination with voice control, not sure how things differ with just a button.

    First I tried using the RR SENDKEY command combined with ACTIVATE and GETFOCUS, like so:

    Code:
    ACTIVATE;IGuidance||SENDKEY;{ENTER}||GETFOCUS
    This was actually from the sample commands.xml that is provided with the voice control download. This just didn't work for standard keys, like {ENTER}, {SPACE}, "1", "r", etc. However it did work for ALT- combinations. Unfortunately this leaves out getting to the main menu.

    Next I tried AutoIt and the send() function. I seemed to get this working on my laptop I'm using for development, but it was occasionally unreliable and I seemed to be able to improve the reliability with sleep() functions in between each command. However on the car computer, (same software) it just didn't work unless I was already focused on the iG window. My code to navigate home looked like this:

    Code:
    Opt("WinSearchChildren", 1)
    Opt("wintitlematchmode", 3)
    Sleep(500)
    WinActivate("iGuidance")
    WinWaitActive("iGuidance")
    Sleep(250)
    Send("{ENTER}")
    Sleep(150)
    ControlFocus ( "", "shortcuts", 906 )
    Sleep(50)
    ControlClick ( "", "", 906 )
    Sleep(150)
    ControlFocus ( "", "go home", 911 )
    Sleep(50)
    ControlClick ( "", "", 911)
    Finally, I discovered the AutoIt ControlSend() function, which the AutoIt help even says is more reliable. I have to provide it the window name and the control ID in addition to the keys, but it worked like a charm every time. I can't flub it up. I even got rid of all the sleep functions, so now commands execute fast. Here is the new code:

    Code:
    Opt("WinSearchChildren", 1)
    Opt("wintitlematchmode", 3)
    WinActivate("iGuidance")
    WinWaitActive("iGuidance")
    
    ControlSend("iGuidance", "", 59648, "{ENTER}")
    ControlFocus ( "", "shortcuts", 906 )
    ControlClick ( "", "", 906 )
    ControlFocus ( "", "go home", 911 )
    ControlClick ( "", "", 911)
    Now I have complete voice control over my native iGuidance. Just wanted to share in case others were having trouble with this.

  2. #2
    Maximum Bitrate
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    520
    I had strange problems trying to send key strokes to control native IGv3. It was very hit and miss, and one computer worked better than another, even though they supposedly had the same software running.
    I also had the exact same problem. The WAIT-command solved it.
    Code:
    ACTIVATE;IGuidance||WAIT;0.1||SENDKEY;{ENTER}||GETFOCUS
    That's all it needed to work correctly, just a short delay after the ACTIVATE-command.

  3. #3
    Low Bitrate
    Join Date
    Jun 2006
    Location
    DuPont, WA
    Posts
    72
    I just tried the WAIT command like you showed, but that didn't work for me. I don't know what's going on with my setup. But hopefully that will be an easier solution for others.

  4. #4
    Maximum Bitrate
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    520
    Did you try increasing the delay, for example "WAIT;0.5" to half a second ? Would really surprise me if this doesn't work. You didn't forget the quotes, did you ?
    Code:
    BXX,XXX,YYY,XXX,YYY,"ACTIVATE;IGuidance||WAIT;0.5||SENDKEY;{ENTER}||GETFOCUS"

  5. #5
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,282
    is been known for a while how to do this,i been using this since iG 3.0 was out.

  6. #6
    Maximum Bitrate
    Join Date
    Aug 2004
    Location
    Germany
    Posts
    520
    A short offtopic question, if I may...how do you identify the control IDs for the buttons of iGuidance ? ResHacker ?

  7. #7
    Low Bitrate
    Join Date
    Jun 2006
    Location
    DuPont, WA
    Posts
    72
    Quote Originally Posted by Konrad View Post
    Did you try increasing the delay, for example "WAIT;0.5" to half a second ? Would really surprise me if this doesn't work. You didn't forget the quotes, did you ?
    Code:
    BXX,XXX,YYY,XXX,YYY,"ACTIVATE;IGuidance||WAIT;0.5||SENDKEY;{ENTER}||GETFOCUS"
    Actually, as a button this works fine for me. Even seems to work reliably without the WAIT at all. It's in the commands.xml file for voice control where it doesn't work, even with WAIT;0.5. Must have something to do with being a plugin. This is what I tried, but didn't work:

    Code:
      <RULE NAME="iguidance" ID="RID_IG" TOPLEVEL="ACTIVE">
        <L PROPNAME="igvalue">
         <P VALSTR="ACTIVATE;IGuidance||WAIT;0.5||SENDKEY;{ENTER}||GETFOCUS">menu</P>
        </L>
      </RULE>

  8. #8
    Low Bitrate
    Join Date
    Jun 2006
    Location
    DuPont, WA
    Posts
    72
    Quote Originally Posted by Konrad View Post
    A short offtopic question, if I may...how do you identify the control IDs for the buttons of iGuidance ? ResHacker ?
    The AutoIt3 info tool (AuInfo3.exe) that comes with AutoIt. Fast and easy.

Similar Threads

  1. Sony hu w/changer control input problem solved!
    By GMpc in forum General Hardware Discussion
    Replies: 1
    Last Post: 03-13-2009, 08:18 PM
  2. voice control!!
    By TiTUS in forum Input Devices
    Replies: 12
    Last Post: 10-10-2003, 10:11 PM
  3. voice control sw
    By TwinII in forum Software & Software Development
    Replies: 31
    Last Post: 08-18-2002, 04:15 AM
  4. voice control idea
    By crazyshaxs in forum Software & Software Development
    Replies: 4
    Last Post: 02-25-2002, 12:32 AM
  5. Voice Control
    By bjrady in forum Software & Software Development
    Replies: 4
    Last Post: 05-26-2001, 03:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •