I have written a Studioware panel that includes CAL scripts that has sliders that does that (as well as other functions). It has two sliders that, when moves , adjusts the selection on the ruler.
The purpose of the actual Studioware panel is to enter common GS/XG discreet controller values and pitch bend values - but I added the selection start and end point position sliders.