Announcement

Collapse
No announcement yet.

Plugins: Insert a command in command stack like return code 3 does

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

  • Plugins: Insert a command in command stack like return code 3 does

    Is there an SDK call to insert a command into the RR command stack like a return code 3 does from the plugin ProcessCommand?

    I know I can use SDK.Execute but that puts the command(s) at the end of the RR command stack.

    It would be convenient to do this if the plug-in needs to "expand" the incoming command and continue processing.

    This would be especially helpful if the plugin is "trapping" an RR command and needs to use return code 0 so other plug-ins see the command.

    The "inserted" command should be executed right after all other plug-ins have "seen" the command.

    The "inserted" command(s) should probably be kept in a FIFO stack and executed when the current command has finished.

    Just a thought (and a little wish).

    Regards,
    Jim
    Last edited by obrienj; 11-06-2011, 09:09 AM. Reason: typos

  • #2
    Originally posted by obrienj View Post
    Is there an SDK call to insert a command into the RR command stack like a return code 3 does from the plugin ProcessCommand?

    I know I can use SDK.Execute but that puts the command(s) at the end of the RR command stack.

    It would be convenient to do this if the plug-in needs to "expand" the incoming command and continue processing.

    This would be especially helpful if the plugin is "trapping" an RR command and needs to use return code 0 so other plug-ins see the command.

    The "inserted" command should be executed right after all other plug-ins have "seen" the command.

    The "inserted" command(s) should probably be kept in a FIFO stack and executed when the current command has finished.

    Just a thought (and a little wish).

    Regards,
    Jim


    You could

    Change the CMD to CMD & "||<your command here"
    Set a flag in your plugin so that it ignores the next instance of that command
    Do a processcommand=3


    There is a danger though that other plugins that react to that command and have already done so before it gets to yours will double process it.

    Comment


    • #3
      One approach I've tried is to issue my own "sub commands" using RC3 which causescontrol them to come right back to me (more or less).

      This can get interesting when the ProcessCommand entry is an RR command (like EXIT or ONSCREENCHANGE) from which one dare not issue an RC3 as I understand things.

      Not terribly clean and it reminds me of "transaction programming" in a former life using a mainframe subsystem called CICS where every terminal interaction required a another program or "spagetti" logic in a single program using switches.

      I guess what I'm asking for is a logical (not necessarily easy) SDK function analogous to SetUserVar and GetUserVar.

      Regards,
      Jim

      Comment


      • #4
        The method that we have used, uses the exectbl file to insert cmds into say basic rr cmds, and yet, the ending cmd is the same one that it was started from.

        Eg.. Say you want to insert cmds into the "Green" cmd.

        "Greeen","Yellow||Purple||Blue||Green_Cont"
        "Green_Cont","Green"

        Part of the trick is that the second line, only is translated to a single cmd. As with a single cmd like that, RR will not start back at the top, but just continue down the exectbl and if nothing else matched try to exec the "Green" cmd itself. It won't loop like you might think.

        Call stack would be:
        Green
        Yellow
        Purple
        Blue
        Green

        Don't know if that will help any?? Just one way of doing it outside a plugin.
        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