Results 1 to 7 of 7

Thread: Retreiving Custom SLider value help needed

  1. #1
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,691
    Blog Entries
    1

    Question 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. #2
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    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

  3. #3
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,691
    Blog Entries
    1
    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

  4. #4
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    "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."

  5. #5
    Newbie
    Join Date
    Jul 2007
    Location
    South Bend, Indiana
    Posts
    1
    [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.

  6. #6
    FLAC Sal R.'s Avatar
    Join Date
    Aug 2006
    Location
    Sun Diego
    Posts
    1,448
    Quote 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$

    Quote 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

  7. #7
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,691
    Blog Entries
    1
    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

Similar Threads

  1. Suburban - Custom console carputer - W/Pics
    By rcracerx in forum Show off your project
    Replies: 35
    Last Post: 06-14-2007, 01:36 PM
  2. Epia-M custom Bios & entertainment module. Bios chip # needed.
    By v1s in forum General Hardware Discussion
    Replies: 0
    Last Post: 11-22-2006, 08:33 PM
  3. Trouble setting custom resolutions....
    By SinnerG in forum LCD/Display
    Replies: 10
    Last Post: 06-18-2003, 07:15 AM
  4. X-MP3Pad: Beta testers needed... Please read!
    By PorscheMP3 in forum Software & Software Development
    Replies: 0
    Last Post: 08-22-2002, 11:55 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
  •