Jim,
myVariable is not initialised and it does not persist. So nothing is in myVariable that could trigger your if structure (<=). In your script myVariable = "myVariable"
you can see this if you change your code to
but
since scrollbardrag is send repeatedly you will get many calls to your if structure. Just put it into a mousedown handler which is invoked at the click on the scrollbar once.
If I understand you correctly something like
Code: Select all
on scrollbarDrag
put the thumbposition of me into fld "Data"
end scrollbarDrag
on mouseDown
add 1 to field "myField"
end mouseDown
should do what you want. It counts how many times the scrollbar was clicked and gives you continously the thumbposition. (provided field "myField" was initialised to 0)
regards
Bernd