I made this quick example of how you can drag a slider. This is for menus only because it stops the program from updating.
rem ==========================================
rem Drag Example
rem ==========================================
rem This program will make the mouse drag a Slider
rem ------------------------------------------
set display mode 800,600,16
position light 0,0,0,400
set ambient light 100
sync on
sync rate 0
hide mouse
make object plain 1,8,8
position object 1,0,0,0
position camera 0,0,-500
set camera to object orientation 1
rem Begin main loop
do
if mouseclick()=1
oldx=mousex()
repeat
x = mousex()
offsetx = oldx-x
position object 1,0-offsetx,0,0
sync
until mouseclick() = 0
endif
sync
rem End main loop
loop