Switch between "actually active" apps based on a list?

See this thread and I suggest you contact How to use a MIDI Controller slider to control system volume?

and I suggest you message

zzz2496

Damir Handoyo

to see what he is doing since 2017.