Scrollbar along curved path

I’m wondering if there is a way to make a custom scrollbar that scrolls along a motion path-specifically a curved one.
I’ve played with some scripts for making custom scrollbars, but whenever I specify the x and y boundaries for the scroll, it doesn’t attach to the curved path and doesn’t scroll the text in the text box.

Thanks for your help,
arsestar