Announcement

Collapse
No announcement yet.

How to communicate with RR via COM/ActiveX?

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

  • How to communicate with RR via COM/ActiveX?

    Hi all,

    I've read Guino's 'How to integrate your app with RR' FAQ:
    http://www.mp3car.com/vbulletin/showthread.php?t=86680

    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
    -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."

    Comment


    • #3
      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!

      Comment


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

        Comment


        • #5
          I'll stick with it auto-loading at the moment.
          Thanks for your help dude!

          Comment


          • #6
            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

            Comment


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

              Comment


              • #8
                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

                Comment


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

                  Comment


                  • #10
                    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

                    Comment


                    • #11
                      if you place the "GPSXXX" labels directly in RR's skin do they show the correct info with the same settings ?

                      The RREarth plugin uses that exact same interface, so I know for a fact the information from the interface is working fine (as long as your GPS is propperly setup). If anything try setting RR to read the GPS port directly and see if it works, then work your way around with XPort3 to share the GPS. RR CAN poll the GPS info from both FD and MM, but you must set them up propperly for it to work. There's a FAQ on that and FD has very clear instructions on that as well.
                      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."

                      Comment


                      • #12
                        Ok, I have a question???

                        I am working on an app and I pull several bits of data from RR. Instead of polling rr for each piece of data, I have tried sending multiple commands and it works great, but it just smashes all of the requested data into one long string.

                        Basically what I'm looking/asking for is a way to use a delimiter with it so that I can try and save some cpu's. As one call to get all the data should be more efficeint than calling rr for each and every piece of data seperatly??

                        EX...

                        $rr = ObjCreate("RoadRunner.SDK")

                        $MY = $rr.GetInfo("VOLUME||GPSLAT||GPSLON||STATUS")

                        Returns - "80%0.0000000.000000PAUS"

                        Thanks.
                        RideRunner...The #1 FE, PERIOD.

                        Current Project: DFXVoice [v1.0 Released]
                        Next in line: RRMedia v2.0

                        DFX 5.1.1 Skin
                        Appstore Link

                        My RideRunner Plugins
                        RRMedia
                        RRExtended
                        DFXVoice

                        "There are no bugs - only undocumented features."

                        Comment


                        • #13
                          Originally posted by Blue ZX3 View Post
                          Ok, I have a question???

                          I am working on an app and I pull several bits of data from RR. Instead of polling rr for each piece of data, I have tried sending multiple commands and it works great, but it just smashes all of the requested data into one long string.

                          Basically what I'm looking/asking for is a way to use a delimiter with it so that I can try and save some cpu's. As one call to get all the data should be more efficeint than calling rr for each and every piece of data seperatly??

                          EX...

                          $rr = ObjCreate("RoadRunner.SDK")

                          $MY = $rr.GetInfo("VOLUME||GPSLAT||GPSLON||STATUS")

                          Returns - "80%0.0000000.000000PAUS"

                          Thanks.
                          hey blue, are you coding in vb or autoit? i'm still using the request method in all my autoit scripts and i was wondering if i could see an example of this in autoit.
                          mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
                          Follow Me on Twitter or Facebook
                          Live mp3Car Facebook Chat

                          Comment


                          • #14
                            Originally posted by Sonicxtacy02 View Post
                            hey blue, are you coding in vb or autoit? i'm still using the request method in all my autoit scripts and i was wondering if i could see an example of this in autoit.
                            Hahahahah...It's right there...Just LOL

                            I have just started to mess with the whole SDK send/rec autoit scrips and decieded to look at the vb.net to see how it was done b/c I use the autoit com at work to enter data in to excel and figured I'd just give it a try...

                            So, in a nut shell.....YES....much,much,much easier to do the same things and doesn't require messing with those other scripts.

                            PS...one drawback, is that I believe that the RR ver can be no older than 10-8 release...otherwise it doesn't work...

                            Happy Code updating..

                            I guess that all you need to do is try and create the obj and if you can't then just fall back to using the old method, to cover all users!


                            Something along this line...

                            $oRR = ObjCreate("RoadRunner.SDK")
                            If @error Then .....
                            RideRunner...The #1 FE, PERIOD.

                            Current Project: DFXVoice [v1.0 Released]
                            Next in line: RRMedia v2.0

                            DFX 5.1.1 Skin
                            Appstore Link

                            My RideRunner Plugins
                            RRMedia
                            RRExtended
                            DFXVoice

                            "There are no bugs - only undocumented features."

                            Comment


                            • #15
                              I have another quest...how would we do the same, but in reverse. Be able to send commands to an autoit script using com/objects?

                              I'm guessing that we'd have to use the objectEvent to somehow catch an incomming message...I can talk to other app but I'd like to know how to talk to my own app...

                              Thanks!
                              RideRunner...The #1 FE, PERIOD.

                              Current Project: DFXVoice [v1.0 Released]
                              Next in line: RRMedia v2.0

                              DFX 5.1.1 Skin
                              Appstore Link

                              My RideRunner Plugins
                              RRMedia
                              RRExtended
                              DFXVoice

                              "There are no bugs - only undocumented features."

                              Comment

                              Working...
                              X