Results 1 to 4 of 4

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

  1. #1
    Variable Bitrate
    Join Date
    Nov 2006
    Posts
    265

    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 at 08:09 AM. Reason: typos

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

  3. #3
    Variable Bitrate
    Join Date
    Nov 2006
    Posts
    265
    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

  4. #4
    The Curator
    Auto Apps:loading...
    Blue ZX3's Avatar
    Join Date
    Aug 2004
    Location
    Chicago area,IL
    Posts
    5,078
    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."

Similar Threads

  1. LIST Command: Riderunner or skin command?
    By blazinlow in forum Road Runner
    Replies: 1
    Last Post: 10-23-2011, 01:28 PM
  2. Replies: 4
    Last Post: 12-14-2008, 06:55 PM
  3. Command
    By tn6478 in forum StreetDeck
    Replies: 4
    Last Post: 07-30-2006, 06:33 AM
  4. Replies: 9
    Last Post: 05-07-2005, 01:58 AM
  5. D3 Up/Down Command
    By Deepgear in forum Map Monkey
    Replies: 7
    Last Post: 03-27-2005, 11:24 AM

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
  •