Results 1 to 4 of 4

Thread: Need help with sending RR SDK commands from AutoIt

  1. #1
    FLAC
    Join Date
    May 2005
    Location
    Vienna, VA
    Posts
    1,375

    Need help with sending RR SDK commands from AutoIt

    Like the title said, I'm trying to send SDK commands from my AutoIt scripts. This is what I got so far. (I'll include 2 scripts here.)

    receiver.au3 - This app can receive any WM_COPYDATA message. It stays in the Task Tray. The window name to send the message to is "Receiver". Run this app. Then do an exec.exe command like this.
    Code:
    C:\Program Files\Road Runner>exec.exe REQUEST;Receiver;TRACKNAME
    You should see a MsgBox pop up with the track name.


    send.au3 - This is where I have problems. I can use it to SendMessage to receiver.au3 listed above (Open send.au3. On line 5, change "RoadRunner" to "Receiver" then execute it). However, it cannot SendMessage to RoadRunner. RR doesn't seem to response.

    Note: You need AutoIt 3.1.1 (latest) to run these scripts. You can download it here.
    http://www.autoitscript.com/autoit3/downloads.php
    (Install AutoIt and double-click directly on the scripts).

    I'd appreciate any help.
    Attached Files Attached Files

  2. #2
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    wow, you actually got it to receive data from RR in your script (I'm impressed) .. interesting that you were unable to send ..

    Anyway, keep in mind that I don't much at all about autoit scripts. Still, looking at your code, you're doing +1 to the string length which is probably adding an extra "garbage" character to your command being sent.. this could prevent RR from interpreting the command from what it's supposed to be. A quick test would be to send a multi-command like PLAY||NEXT chances are that if the garbage is the problem, the first command would work and the second would not.

    In any case, I hope you realize that the SendCommand function you made would have the same effect as using exec.exe (perhaps just better for commands with: >> || and ; ) -- something you can overcome with exectbl.ini.

    I also hope that you're aware of the SENDMSG command in RR that would allow you to send data to your autoit script directly from RR's skin (pressing buttons etc) -- this is just a tip

    PS: If you get the SEND script to work, I'd like to include those scripts to RR's SDK examples with your permission.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  3. #3
    FLAC
    Join Date
    May 2005
    Location
    Vienna, VA
    Posts
    1,375
    Anyway, keep in mind that I don't much at all about autoit scripts. Still, looking at your code, you're doing +1 to the string length which is probably adding an extra "garbage" character to your command being sent.. this could prevent RR from interpreting the command from what it's supposed to be. A quick test would be to send a multi-command like PLAY||NEXT chances are that if the garbage is the problem, the first command would work and the second would not.
    Woah, great tips, guino. That solved it. Weird because on line 10, I have to leave the "+1" in for it to work.

    Of course, please post it in the SDK examples for others to use.

    New files included here.
    Attached Files Attached Files

  4. #4
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    Cool, thanks! I've also just posted a FAQ on using the BasePlugin sources for those who read this interested in interfacing different things into RR.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

Similar Threads

  1. Parallel port relay control in RR using Autoit?
    By momanz in forum Road Runner
    Replies: 5
    Last Post: 04-03-2009, 09:20 AM
  2. Can this be done
    By ashgrovered in forum Coders Corner
    Replies: 19
    Last Post: 04-04-2006, 11:50 PM
  3. Sending RR commands to RR inside FD.......
    By Spaghetti in forum FreeDrive
    Replies: 0
    Last Post: 12-24-2005, 06:49 AM
  4. SDK commands over the serial port ????
    By tolisn in forum Road Runner
    Replies: 4
    Last Post: 12-14-2005, 12:03 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
  •