Send Custom Apple Script Slider value to an App or Serial port

Hello, community!
I have a very specific question and I cannot find solution by myself.

I want to set a Slider widget on the touchbar that will send its value to Bome MIDI Translator Pro.
Then MIDI Translator will gets this value and converts this in MIDI CC message (Control Change).
Bome MIDI Translator have "Keystroke/Text" input and "Text/Data(numbers) from Serial Port" inputs

I spent the whole day learning how to make it happen but my skills are so low that I cannot even find information using chatGPT etc.

My suggestions on how it could be done:
I need to send dynamic Slider value to an app as a text or number data (it's my first suggestion).
And I need to know if it is possible to send Text or Numbers data to a serial port on Mac.

Please reply to this topic and ask any questions. Until developers would not add MIDI output to BTT the question remains. Thank you for any reply!