[Legacy] Slider/http requests

Topics related to the iOS and/or Apple Watch app.
Post Reply
User avatar
Site Admin
Posts: 83
Joined: Mon Dec 01, 2014 12:41 pm

[Legacy] Slider/http requests

Post by Dave »

Original post by: Issachan

Hi all !
I tried several things but I do not understand how to use the slider with several http requests. I have a box automation to control my lights.
i have for requests for on or off and dim ( 10%, 20%...etc )... how can i use it with slider ?
December 25, 2015 at 2:35 PM Edit Delete Flag Quote & Reply

Limited Member
Posts: 79
I have an application that adjusts the audio delay for a surround processor. The slide must go from 0-500. I have all 500 points on the slide, but I define the increment as five because one cannot reliably drag to one point stops with a slider that does not occupy the whole screen. I define a (-) and (+) button at each end of the slider, respectively, to allow single point increment or decrement. As the user drags the slide a text box shows the current slider position (to the nearest five). The action at each stop updates the text box. On release, I build a text string that is sent to the receiver.

The script is very simple:

rs = _getText( "LipSyncTrack");
rs = rs.substr( 0, rs.length -2 );
return "[#]YNCAcommand";

YNCAcommand uses YNCAcommands to build the final string sent to the receiver. The above could be simpler, but I wanted to be able to tweek line terminations of all commands at a central point (YNCAcommand). YNCAcommnand also has some diagnostics that I can easily turn ON and OFF while testing.

Post Reply