I managed to get the raspberry pi to invoke a python script automatically when the rapsberry pi is powered up using .sh files.
However, I’m trying to figure out a way to invoke python scripts using transmitters, so that I can invoke different scripts at different times without the need for my pi to connect to the same network with the GCS.
You can add a custom module in MAVProxy to allow you run your own custom scripts. You can essentially use it to detect RC signal changes as one example.