Announcement

Collapse
No announcement yet.

ControlSend() solved my native iGuidance voice control woes

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.
    My setup: Hummer H3, iBase MB899, Intel Core Duo, RR, iGv3, DSATX, Mechatroniks chassis, 41Hz AMP3

  • #2
    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.

    Comment


    • #3
      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.
      My setup: Hummer H3, iBase MB899, Intel Core Duo, RR, iGv3, DSATX, Mechatroniks chassis, 41Hz AMP3

      Comment


      • #4
        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"

        Comment


        • #5
          is been known for a while how to do this,i been using this since iG 3.0 was out.
          BASSRR ==> [Audio Player/MusicDB/Cd Player/Ripper/Rate/Internet Radio/Audio Capture/Youtube Video]
          RRTube ==> [View/Download Youtube Videos]
          WifiMan ==> [Wifi Manager]
          RRec ==> [Audio Capture]

          If You Want To Be Given Everything, Give Everything Up ...
          Bird York -- In The Deep --

          Comment


          • #6
            A short offtopic question, if I may...how do you identify the control IDs for the buttons of iGuidance ? ResHacker ?

            Comment


            • #7
              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>
              My setup: Hummer H3, iBase MB899, Intel Core Duo, RR, iGv3, DSATX, Mechatroniks chassis, 41Hz AMP3

              Comment


              • #8
                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.
                My setup: Hummer H3, iBase MB899, Intel Core Duo, RR, iGv3, DSATX, Mechatroniks chassis, 41Hz AMP3

                Comment

                Working...
                X