Results 1 to 3 of 3

Thread: Sample AutoIT code RRSource11-02-07 fails with RR voicecontrol

  1. #1
    Variable Bitrate
    Join Date
    Mar 2006
    Posts
    351
    Blog Entries
    1

    Sample AutoIT code RRSource11-02-07 fails with RR voicecontrol

    I'm planning to write a Road Runner plug-in using AutoIT (latest version) and discovered a weird bug with the sample code. Inside of RR.ini if [HL]usevoicecontrol=false[/HL] AutoIT script works fine, however if you change [HL]usevoicecontrol=true[/HL] AutoIT script fails to perform action. I want to keep RR voice control, so my guess there's an error somewhere in this sample script?


    Sample send.au3 AutoIT script from RRSource 11-02-07
    ================================================== ====

    Global Const $WM_COPYDATA = 0x4A

    $My_Hwnd = GUICreate("SendData")

    $hwnd_RR = WinGetHandle("RoadRunner")

    SendCommand($My_Hwnd, $hwnd_RR, "PAUSE")

    Func SendCommand($My_Hwnd, $hwnd_Remote, $sCmd)
    Local $CmdStruct = DllStructCreate('Char[' & StringLen($sCmd) + 1 & ']')
    DllStructSetData($CmdStruct, 1, $sCmd)
    Local $COPYDATA = DllStructCreate('Ptr;DWord;Ptr')
    DllStructSetData($COPYDATA, 1, 1)
    DllStructSetData($COPYDATA, 2, StringLen($sCmd))
    DllStructSetData($COPYDATA, 3, DllStructGetPtr($CmdStruct))
    DllCall('User32.dll', 'None', 'SendMessage', 'HWnd', $hwnd_Remote, 'Int', $WM_COPYDATA, 'HWnd', $My_Hwnd, 'Ptr', DllStructGetPtr($COPYDATA))
    $COPYDATA = 0
    $CmdStruct = 0
    EndFunc

  2. #2
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,700
    Blog Entries
    1
    Not sure what would cause that, but I can simplify your code down to 2 lines(Not including the comments). Also an example on how to get info from RR as well. It's is cleaner and faster to use RR's COM interface:

    PHP Code:
    Open COM with RR
    $rr 
    ObjCreate("RoadRunner.sdk")

    Send a command to RR
    $rr
    .Execute("PAUSE")




    Get Info from RR
    $MyTrackName 
    $rr.getinfo("TAGTITLE")

    ;
    Show the info received:
    MsgBox(0''$MyTrackName
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  3. #3
    Variable Bitrate
    Join Date
    Mar 2006
    Posts
    351
    Blog Entries
    1
    Wow that is a lot shorter. I just tried your code with RR VoiceControl and it works!

    Thanks JohnWPB.

Similar Threads

  1. Indexing music in 1.0.9.8 Failed
    By hovalistic in forum StreetDeck
    Replies: 0
    Last Post: 07-07-2007, 11:19 AM
  2. Replies: 0
    Last Post: 09-23-2006, 08:38 PM
  3. Replies: 0
    Last Post: 06-11-2006, 05:49 PM
  4. How do I use the Base plugin sources ?
    By guino in forum RR FAQ
    Replies: 1
    Last Post: 04-24-2006, 03:43 PM
  5. status update....
    By 0l33l in forum PowerVoice
    Replies: 17
    Last Post: 05-05-2005, 12:22 PM

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
  •