Sure.
You have to use javascript using the midi remote api.
You can start here:
From what I saw, Steinberg has some intro info there.
Note that you can get the same info by opening the lower-zone midi-remote tab, enable “scripting tools” and then select “Open MIDI Remote API - Programmer’s Guide”: