Can Custom Slider Widget run Apple Script only once?

I've hooked up Arduino with few relays to my adjustable standing desk and want to control its height using the Custom Slider widget. Tables API is as simple as passing height in GET request. It is working nicely with TouchBar Buttons when i set predefined height in the apple script like this:
set theURL to ""
do shell script "curl " & quoted form of theURL

but when I use slider my table goes mad as it gets lots of requests, so it does not move directly to the selected position, but makes stops and continues movement.
So I wonder if there is a way for Custom Slider to trigger Apple Script only when I have moved the slider to the position I want and lifted my finger?