Announcement

Collapse
No announcement yet.

How do you create a momentary button in a plugin?

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

  • How do you create a momentary button in a plugin?

    I'd like to add a button that will perform a function when pressed and held, then perform another command upon the button being released. exactly the way how BUTTONUP and BUTTONDOWN parameters work for flash commands. How can this be acheived using the plugin interface. As far as i know RR doesnt report mouse events. So how would i know inside of my plugin when the button is released?
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  • #2
    My thinking is that there isn't a way, but what you could do is use the adv btn syntax'x with custom cmds that either you watch for in the plugin or have them in the exectbl.ini file.

    For example:
    Bxx,xxx,xxx,xxx,xxx,"PLAY",@STOP@ (will execute PLAY on single click and STOP on hold)
    Bxx,xxx,xxx,xxx,xxx,"PLAY",&STOP& (will execute STOP when pressing down and PLAY when letting it off)

    And if you want it so that there has to be down for so long you could watch for the dn cmd and save the time/timer and see if long enough when the up cmd get exec'd before continuing what you want...

    Hope that makes sense..
    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


    • #3
      Originally posted by Sonicxtacy02 View Post
      I'd like to add a button that will perform a function when pressed and held, then perform another command upon the button being released. exactly the way how BUTTONUP and BUTTONDOWN parameters work for flash commands. How can this be acheived using the plugin interface. As far as i know RR doesnt report mouse events. So how would i know inside of my plugin when the button is released?
      What's wrong with b,xxx,xxx,xxx,xxx,"PLAY||PLAY"

      Doesn't that make it a momentary?
      HARDWARE: Fujitsu Stylistic ST5111w/WiFi and dock, internal Hitachi 500G HD, external 1TB HD, Sierra Wireless Aircard 550, DVD-RW, BoomzBox HD radio, XM Commander, Delorme GPS, Saitek X-52 Pro joystick, BluSoleil Bluetooth, TPMS, FB, Elm327

      Comment


      • #4
        Originally posted by Blue ZX3 View Post
        My thinking is that there isn't a way, but what you could do is use the adv btn syntax'x with custom cmds that either you watch for in the plugin or have them in the exectbl.ini file.

        For example:
        Bxx,xxx,xxx,xxx,xxx,"PLAY",@STOP@ (will execute PLAY on single click and STOP on hold)
        Bxx,xxx,xxx,xxx,xxx,"PLAY",&STOP& (will execute STOP when pressing down and PLAY when letting it off)

        And if you want it so that there has to be down for so long you could watch for the dn cmd and save the time/timer and see if long enough when the up cmd get exec'd before continuing what you want...

        Hope that makes sense..

        I understand what ur doing. But i'm not sure it'll work with what i'm trying to do. This is for my fusion brain plugin. A user requested momentary type buttons that work the same way that power windows work


        Originally posted by GizmoQ View Post
        What's wrong with b,xxx,xxx,xxx,xxx,"PLAY||PLAY"

        Doesn't that make it a momentary?

        All that doesi s run the command twice. Essentially i'd like to turn a command for a user-defined amount of time then run a command after the time has elapsed. Again, think of the way power windows work.
        mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
        Follow Me on Twitter or Facebook
        Live mp3Car Facebook Chat

        Comment


        • #5
          Yeah, think about it like this yall...

          press the button for your power windows...when you let go, it stops moving (unless you have 1-touch, but thats beside the point)

          he wants to make a button in RR have the same properties....only "on" when you're actually pressing it, and "off" as soon as you take your finger off of it...

          Now, I dont know what RR was originally written in, but I think i heard someone mention VB? VB definitely allows for mousedown and mouseup events, so it shouldn't be impossible to make RR do it...
          Planning: [|||||||||-] 90%
          Purchased: [|||||||||/] 99%
          Installation: [|||||||||-] 90% (when is anyone's project ever REALLY done...)

          Comment


          • #6
            How bout using the above suggest:

            b,xxx,xxx,..."MYBTNUP",&MYBTNDN&

            The MYBTNDN cmd would enable a tmr to run and allowing rr to continue on its marry way, then the MYBTNUP would stop the timer, giving you the effect that your looking for..
            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


            • #7
              Originally posted by Blue ZX3 View Post
              How bout using the above suggest:

              b,xxx,xxx,..."MYBTNUP",&MYBTNDN&

              The MYBTNDN cmd would enable a tmr to run and allowing rr to continue on its marry way, then the MYBTNUP would stop the timer, giving you the effect that your looking for..
              I'm implementing it now.
              mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
              Follow Me on Twitter or Facebook
              Live mp3Car Facebook Chat

              Comment


              • #8
                works BEAUTIFULLY. Thanks Blue
                mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
                Follow Me on Twitter or Facebook
                Live mp3Car Facebook Chat

                Comment


                • #9
                  No problem...glad that you got it working...
                  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


                  • #10
                    That's good news for me

                    Thanks a lot Blue!
                    Planning: [|||||||||-] 90%
                    Purchased: [|||||||||/] 99%
                    Installation: [|||||||||-] 90% (when is anyone's project ever REALLY done...)

                    Comment

                    Working...
                    X