Announcement

Collapse
No announcement yet.

Checks events into a RR plugin

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

  • Checks events into a RR plugin

    I try to check my Sygic's events into RR (vb.net)!
    My sygic's events are:
    on_rrsygicdrive_route_usercancel
    on_rrsygicdrive_waipoint_visited
    on_rrsygicdrive_route_finish
    on_rrsygicdrive_route_computed
    on_rrsygicdrive_off_route
    ...

    So i have written these lines into my plugin:
    Code:
            'check sygic's events if not defined into the exectbl.ini
            If Left(LCase(CMD), 16) = "on_rrsygicdrive_" Then
                If Len(CMD) > 16 And InStr(CMD, ",") Then
                    sArray = Split(CMD, ",")
                    'MsgBox(sArray(0) & ";" & sArray(1), vbOKOnly, "Info")
                    CMD = Chr(34) & sArray(1) & Chr(34)
                    ProcessCommand = 2
                ElseIf Len(CMD) > 16 And Not InStr(CMD, ",") Then
                    ProcessCommand = 0
                End If
            End If
    but into the skintool, if i have no sygic's events defined into my exectbl.ini file , i obtain this :
    Code:
    on_rrsygicdrive_off_route
    -
    Command Not Executed: on_rrsygicdrive_off_route
    The events run very well if i define one into the exectbl.ini file !

    That would be a good idea if i create a empty command for each event like that ?
    Code:
                Case "on_rrsygicdrive_route_usercancel"
                    ProcessCommand = 2
                Case "on_rrsygicdrive_waipoint_visited"
                    ProcessCommand = 2
                Case "on_rrsygicdrive_route_finish"
                    ProcessCommand = 2
                Case "on_rrsygicdrive_route_computed"
                    ProcessCommand = 2
                Case "on_rrsygicdrive_off_route"
                    ProcessCommand = 2
    Thanks for your help !
    Last edited by pierrotm777; 02-09-2012, 09:29 AM.

  • #2
    Why are you splitting the command by commas?

    Code:
     If Len(CMD) > 16 And InStr(CMD, ",") Then
                    sArray = Split(CMD, ",")
    Surely it should be underscores

    Code:
     If Len(CMD) > 16 And InStr(CMD, "_") Then
                    sArray = Split(CMD, "_")

    Comment


    • #3
      Heuu,
      Because i check if a line as:
      "on_rrsygicdrive_off_route","EVENTS_TEST","SETVAR; RRSygicDriveInfo;EVENTS TEST !!!!!!||menu;RRSygicDrive_info.skin"
      And if this line exist into my exectbl.ini file, the command is executed !

      I do an error ?

      Comment


      • #4
        as far as i remember, if you want to pass events to plugins, you must use * as the first character of the string,

        i.e. "on_rrsygicdrive_off_route" must be "*on_rrsygicdrive_off_route"

        Is somewhere on the documentation.
        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


        • #5
          * MEANS all plugins will see this event
          -Thanks
          Mitch
          www.rush2112.net

          "Did you test it in carwings??"

          Sun, Come shine my way
          May healing waters bury all my pain
          Wind, Carry me home
          The fabric of reality is tearing apart
          The piece of me that died
          Will return To live again

          Comment


          • #6
            Ok shall try that as soon as possible .
            Thanks for your help !

            Comment


            • #7
              something tells me only your plugin should see these events, my question is whats creating the events...
              are they there for people to use? if its just your plugin, you shouldnt have them...
              but im not sure what your exactly trying to do... just keep that in mind
              -Thanks
              Mitch
              www.rush2112.net

              "Did you test it in carwings??"

              Sun, Come shine my way
              May healing waters bury all my pain
              Wind, Carry me home
              The fabric of reality is tearing apart
              The piece of me that died
              Will return To live again

              Comment


              • #8
                Originally posted by mitchjs View Post
                something tells me only your plugin should see these events, my question is whats creating the events...
                are they there for people to use? if its just your plugin, you shouldnt have them...
                but im not sure what your exactly trying to do... just keep that in mind
                That i should like is to create one RR event for each Sygic's event that each RR's user use or not into his exectbl.ini file .
                I lauch my Sygic events like that:
                Code:
                    Private Sub NavHandlerLocal(ByVal nEventID As Integer, ByVal strData As IntPtr)
                
                        If INI.ReadString("RRSygicDrive", "eventsactive", "") = "Yes" Then
                            Select Case nEventID
                                Case ApplicationEvents.EVENT_ROUTE_USERCANCEL
                                    SDK.Execute("on_rrsygicdrive_route_usercancel")
                                Case ApplicationEvents.EVENT_WAIPOINT_VISITED
                                    SDK.Execute("on_rrsygicdrive_waipoint_visited")
                                Case ApplicationEvents.EVENT_ROUTE_FINISH
                                    SDK.Execute("on_rrsygicdrive_route_finish")
                                Case ApplicationEvents.EVENT_ROUTE_COMPUTED
                                    SDK.Execute("on_rrsygicdrive_route_computed")
                                Case ApplicationEvents.EVENT_OFF_ROUTE
                                    SDK.Execute("on_rrsygicdrive_off_route")
                                    FlashMessage("Warning ... Off Route      ")
                                Case ApplicationEvents.EVENT_APP_EXIT
                                    SDK.Execute("on_rrsygicdrive_app_exit")
                                Case ApplicationEvents.EVENT_MAIN_MENU
                                    SDK.Execute("on_rrsygicdrive_main_menu")
                                Case ApplicationEvents.EVENT_CONTEXT_MENU
                                    SDK.Execute("on_rrsygicdrive_context_menu")
                                Case ApplicationEvents.EVENT_EXIT_MENU
                                    SDK.Execute("on_rrsygicdrive_exit_menu")
                                Case ApplicationEvents.EVENT_CUSTOM_MENU
                                    SDK.Execute("on_rrsygicdrive_custom_menu")
                                Case ApplicationEvents.EVENT_CHANGE_LANGUAGE
                                    SDK.Execute("on_rrsygicdrive_change_language")
                                Case ApplicationEvents.EVENT_CHANGE_ORIENTATION
                                    SDK.Execute("on_rrsygicdrive_change_orientation")
                                Case ApplicationEvents.EVENT_RADAR_WARNING
                                    SDK.Execute("on_rrsygicdrive_radar_warning")
                                    'FlashMessage("Warning ... Radar      ")
                                Case ApplicationEvents.EVENT_POI_WARNING
                                    SDK.Execute("on_rrsygicdrive_poi_warning")
                                    'FlashMessage("Warning ... Poi Warning      ")
                                Case ApplicationEvents.EVENT_BORDER_CROSSING
                                    SDK.Execute("on_rrsygicdrive_border_crossing")
                                Case ApplicationEvents.EVENT_SPEED_EXCEEDING
                                    SDK.Execute("on_rrsygicdrive_speed_exeeding")
                                    'FlashMessage("Warning ... Speedlimit      ")
                                Case ApplicationEvents.EVENT_BITMAP_CLICK
                                    SDK.Execute("on_rrsygicdrive_bitmap_click")
                            End Select
                
                        Else
                
                        End If
                        Return
                    End Sub
                I don't know if it's the good way, but as these on_rrsygicdrive... events doesn't exist into my 'ProcessCommand' function, RR return an error.
                Last edited by pierrotm777; 02-11-2012, 08:50 AM.

                Comment

                Working...
                X