Page 1 of 4 1234 LastLast
Results 1 to 10 of 36

Thread: How to communicate with RR via COM/ActiveX?

  1. #1
    Maximum Bitrate
    Join Date
    Nov 2005
    Posts
    597

    Question How to communicate with RR via COM/ActiveX?

    Hi all,

    I've read Guino's 'How to integrate your app with RR' FAQ:
    How do I integrate my application with RR ?

    But as I'm only new to programming, I'm having a little trouble figuring out how to actually use my app to talk to RR using Method 3 - COM/ActiveX SDK.(The reason I chose this method is that it seems to be the preferred method for communicating with RR, according to Guino.)

    I'm using VB6 to create the app, but I dont know where to put the

    Set SDK = CreateObject("RoadRunner.SDK")

    in order that I can then use commands like

    SDK.Execute "PLAY"
    SDK.Execute "LOAD;AUDIO_PLAYER.SKIN"
    SDK.Execute "LOAD;AUDIO_PLAYER.SKIN", True
    MYVAR = SDK.GetInfo("TRACKNAME")

    within my code, to trigger certain events in RR.
    If anyone could give me an example, or a link to somewhere where I could learn how, I would really appreciate it.

    Cheers
    Ice

  2. #2
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    -Create a new project
    -Add a button and a label to the form
    -double click on any empty spot of the form
    -on the form_load add: Set SDK = CreateObject("RoadRunner.SDK")
    -Scroll to the top of the form and add this as the first line: Dim SDK as object
    -Close the code window
    -Double click on the button and add this:
    SDK.Execute "PLAY"
    label1.caption = SDK.GetInfo("TRACKNAME")

    run it and press the button -- it should play/pause and display the track info on the label. That's all.
    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
    Maximum Bitrate
    Join Date
    Nov 2005
    Posts
    597
    I followed your instructions exactly Guino, but I get this error at compile/run.

    -------------------------
    Runtime Error '429':
    ActiveX component can't create object
    -------------------------

    The compiler halts at: Set SDK = CreateObject("RoadRunner.SDK")

    I think its not finding/recognising/liking "RoadRunner.SDK".

    EDIT
    *************************
    I downloaded the latest version of RR (12 Nov 2006) and ran it. Then I recompiled the app and........ IT WORKED .


    If I execute the App and RR isnt running, the app loads RR.
    Is there anyway to prevent RR from being loaded when the app executes?
    *************************

    Where can I find a list of commands for SDK.Execute "____" and SDK.___ etc?

    Thanks Guino!

  4. #4
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    You can execute any commands in skin commands.txt, you can read any label codes listed in the same file.

    You can CHECK if RR is running using: if FindWindow("RoadRunner", vbnullstring) then ... in order to only run the createobject line when RR is already running. The createobject line will run RR automatically because RR can't execute commands or provide any information if it isn't running. Before you ask, you'll probably have to copy the declaration of findwindow from apistuff.bas (in RR's source).
    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."

  5. #5
    Maximum Bitrate
    Join Date
    Nov 2005
    Posts
    597
    I'll stick with it auto-loading at the moment.
    Thanks for your help dude!

  6. #6
    Constant Bitrate KennyKen's Avatar
    Join Date
    Sep 2004
    Location
    England
    Posts
    118
    Am i being a biffer or something? but i can only return zero's for:
    Lat
    Long
    HDG
    ALT
    Speed

    I can get the title and number of satalites

    Here is what i have: (Its the most basic program...)
    Code:
    Dim SDK As Object
    Dim GPS As Object
    
    Private Sub Command1_Click()
    SDK.Execute "PLAY"
    Label1.Caption = SDK.GETInfo("TRACKNAME")
    Label2.Caption = GPS.SATS
    Label3.Caption = GPS.LAT
    Label4.Caption = GPS.LON
    Label5.Caption = GPS.HDG
    Label11.Caption = GPS.Alt
    Label12.Caption = GPS.Speed
    
    End Sub
    
    Private Sub Form_Load()
    Set SDK = CreateObject("RoadRunner.SDK")
    Set GPS = CreateObject("RoadRunner.GPS")
    End Sub
    Any ideas what im doing wrong. ive got Freedrive working and there is a route set and it definately gives me readings inside the GPS window.

    I have tried a different skin and got the same
    I have tried using MM intead of FD but then i dont even get the number of SATs.

    Thanks in advance
    ------
    Prepping for Trax in september
    Re-Building the whole CarPC to upgrade all the software
    Whole new boot build and moulding my screen into the dash...Again

  7. #7
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,581
    Quote Originally Posted by KennyKen View Post
    Am i being a biffer or something? but i can only return zero's for:
    Lat
    Long
    HDG
    ALT
    Speed

    I can get the title and number of satalites


    Any ideas what im doing wrong. ive got Freedrive working and there is a route set and it definately gives me readings inside the GPS window.

    I have tried a different skin and got the same
    I have tried using MM intead of FD but then i dont even get the number of SATs.

    Thanks in advance
    You need to have RR connected to the GPS mouse not a 3rd party navigation program.

  8. #8
    Constant Bitrate KennyKen's Avatar
    Join Date
    Sep 2004
    Location
    England
    Posts
    118
    so there is no way to get it running through another navigation program? but RR doesnt have navigation built in, or does this mean i will need two GPS receivers.

    1 for RR and 1 for FD - Sorry just a tad confused now
    ------
    Prepping for Trax in september
    Re-Building the whole CarPC to upgrade all the software
    Whole new boot build and moulding my screen into the dash...Again

  9. #9
    Confusion Master
    Auto Apps:loading...
    Enforcer's Avatar
    Join Date
    Sep 2003
    Location
    If you go down to the woods today, You're sure of
    Posts
    14,581
    RR does not have navigation built in per se. It can read NMEA info from a GPS receiever and that is the information you are trying to pull in your app.

    You don't need two GPS receivers, but will need a GPS port splitter. Do a search for GPS port splitter on the forum and you should have some info on them. Then just set the GPS Navigation to one virtual port and the set the GPS port in RRconfig to another.

  10. #10
    Constant Bitrate KennyKen's Avatar
    Join Date
    Sep 2004
    Location
    England
    Posts
    118
    Just got Xport 3 - Enforcer you rock
    ------
    Prepping for Trax in september
    Re-Building the whole CarPC to upgrade all the software
    Whole new boot build and moulding my screen into the dash...Again

Page 1 of 4 1234 LastLast

Similar Threads

  1. REQUEST: Run Multiple RR instances
    By Jarrod in forum Road Runner
    Replies: 33
    Last Post: 12-21-2008, 07:54 AM
  2. Replies: 0
    Last Post: 09-23-2006, 08:38 PM
  3. Replies: 0
    Last Post: 06-11-2006, 05:49 PM
  4. RR doesn't start Phoco on initial load..
    By DutchBurner in forum Road Runner
    Replies: 16
    Last Post: 11-04-2005, 01:17 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
  •