Results 1 to 10 of 10

Thread: How do you create a momentary button in a plugin?

  1. #1
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51

    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.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

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

  3. #3
    The Last Good Gremlin GizmoQ's Avatar
    Join Date
    Nov 2004
    Location
    St Louis
    Posts
    2,347
    Quote 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

  4. #4
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51
    Quote 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


    Quote 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.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  5. #5
    Variable Bitrate
    Join Date
    Sep 2007
    Location
    Export, PA
    Posts
    265
    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...)

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

  7. #7
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51
    Quote 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.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  8. #8
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,161
    Blog Entries
    51
    works BEAUTIFULLY. Thanks Blue
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

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

  10. #10
    Variable Bitrate
    Join Date
    Sep 2007
    Location
    Export, PA
    Posts
    265
    That's good news for me

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

Similar Threads

  1. Velleman K8055 USB I/O Board Extension plugin
    By 307SW_NLD in forum RR Released Plugins
    Replies: 224
    Last Post: 02-24-2013, 06:59 AM
  2. RRJTFE: Jump To File Extension Plugin (beta)
    By Sal R. in forum RR Plugins
    Replies: 47
    Last Post: 11-29-2010, 05:54 AM
  3. nGhost 2.0.0 Final is out!
    By tripzero in forum LinuxICE
    Replies: 53
    Last Post: 07-16-2009, 09:16 PM
  4. Custom Indicator Bug
    By JohnWPB in forum RR Bug Tracker
    Replies: 4
    Last Post: 03-27-2008, 05:10 PM
  5. how to create MINI button?
    By TheJack in forum FP Skins
    Replies: 5
    Last Post: 09-13-2006, 01:14 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
  •