The answer is 'yes' if using a timer, as shown in the attached script.
Note that the new value only gets read when the slider is released.
cls
let pinNo = 1
let Brightness = 512
print "Control PIN"
textbox pinNo
print " Brightness"
textbox Brightness
slider Brightness,0,1024
timer 200,[SetBrightness]
'button " Set Brightness",[SetBrightness]
button " Exit ", [TestExit]
wait
[SetBrightness]
io(pwo,pinNo,Brightness)
wait
[TestExit]
end