keys

hi I need help for this script. create the initial and final keys in each spinner through the slider.

slider sld1 "+ - -" range:[-90, 90, 0] spinner tStart "Start Frame: " range:[0,100000,animationRange.start] type:#integer

spinner tEnd "End Frame: " range:[0, 100000,animationRange.end] type:#integer

on sld1 changed val do

with animate on
(
at time tStart $.pos.controller.x_position = val

at time tEnd $.pos.controller.x_position = val )