Announcement

Collapse
No announcement yet.

Retreiving Custom SLider value help needed

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

  • Retreiving Custom SLider value help needed

    I am working on a script, that I need to get the slider value sent to. I have read there is a way to set a slider, then press a button, to get value of where the slider is.

    If this were the way a volume slider worked, you would need to put the slider where you want, and then press a button to actually change the volume.


    I am looking to do this in one step. Move the slider to the center for instance, and RR sends/stores a 50% command (or 0 to 255 whatever, I can have the script EVAL the range to get the correct value I need). I just need to then read that value after the slider has been moved without an extra "set" button to do it. Does anyone know of a way to do this?
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  • #2
    In ExecTBL.ini,

    "ONSLD<SLIDERVARNAME>","SENDMSG;<your script>;<cmd>"

    Where <SLIDERVARNAME> is the CL slider var name. "ONSLD<SLIDERVARNAME>" is executed everytime you adjust the CL slider.

    You can then tell your script to read the raw value of <SLIDERVARNAME> and evaluate it w/in the script.

    EDIT: If you're just creating a custom VOLUME slider, the raw slider value can be evaluated w/in rr w/o the need of an external script:

    Skin Custom Slider:
    Code:
    S03,...,H,03,"slider2.gif",30,"$RAWVOLUMEVAR$",""
    
    
    
    .
    ExecTBL.ini
    Code:
    "ONSLDRAWVOLUMEVAR","SETVOLUME;<LINE>;$RAWVOLUMEVAR$"
    
    
    
    .
    I think that might work...*shrugs*
    Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

    Comment


    • #3
      Thanks! I will give it a shot now.

      Actually, hahaha this is not for volume control..... Its to dim lights in the living room

      EDIT:

      Ok, I am pretty sure I have the exectbl.ini correct. What I am unsure of is the skin code. In your above example, I do not see where the slider name goes:
      Code:
      S03,...,H,03,"slider2.gif",30,"$RAWVOLUMEVAR$",""
      I also have to pass 2 variables with the skin command(slider pressed), the device to control and the level to set it at. something like $device$ $dimlevel$. (The Device is hard coded, but the slider var needs to report where the slider is)

      I have a vbscript that reads the 2 parameters passed to it. It then in turn sends that command over the network to the home automation server to carry out the command.

      This is what I have in the exectbl.ini:

      Code:
      "ONSLD","RUNQW;wscript.exe" "$SkinPath$\scripts\vb.vbs|$device$ $dimlevel$"
      Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

      My Fiero Build Thread

      Comment


      • #4
        "ONSLD" needs the variable name after... like "ONSLDRAWVOLUMEVAR"..
        Ride Runner RR's Myspace

        "Being happy is not about having what you want, it's about wanting what you have."
        "The best things in life are always free - but that doesn't mean money can't buy you good things."

        Comment


        • #5
          [QUOTE=JohnWPB;1178580]Thanks! I will give it a shot now.

          Actually, hahaha this is not for volume control..... Its to dim lights in the living room

          snip

          I only hope that means there will be an x-10 skin in DFX 3. I'm keeping my fingers crossed.

          Comment


          • #6
            Originally posted by JohnWPB View Post
            Thanks! I will give it a shot now.

            Actually, hahaha this is not for volume control..... Its to dim lights in the living room

            EDIT:

            Ok, I am pretty sure I have the exectbl.ini correct. What I am unsure of is the skin code. In your above example, I do not see where the slider name goes:
            Code:
            S03,...,H,03,"slider2.gif",30,"$RAWVOLUMEVAR$",""
            In the case above, the slider name is the variable $RAWVOLUMEVAR$

            Originally posted by JohnWPB View Post
            I also have to pass 2 variables with the skin command(slider pressed), the device to control and the level to set it at. something like $device$ $dimlevel$. (The Device is hard coded, but the slider var needs to report where the slider is)

            I have a vbscript that reads the 2 parameters passed to it. It then in turn sends that command over the network to the home automation server to carry out the command.

            This is what I have in the exectbl.ini:

            Code:
            "ONSLD","RUNQW;wscript.exe" "$SkinPath$\scripts\vb.vbs|$device$ $dimlevel$"
            The slider above can only pass one numerical value that ranges from 0-65535, which is stored in the variable $RAWVOLUMEVAR$. To be able to pass 2 variables, you'll probably need two sliders, use a BYVAR command, or use and EVAL function if the variables are related somehow.
            Pico-ITX / XP Home with EWF-HORM / RR v12/02/2009 / Winamp v5.13 / RRMedia v1.2.2

            Comment


            • #7
              Thanks for the help, I have it almost all working with the above code.
              Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

              My Fiero Build Thread

              Comment

              Working...
              X