Hi,
As a starting point I would suggest looking at the following remote control examples:
https://forum.tek.com/viewtopic.php?f=580&t=133570
If you have yet to pick a language to use, then I generally suggest Python3.
Those examples might not do the specific things you need, for that you will need to consult the programmer's manual and find the commands you need:
https://www.tek.com/en/oscilloscope/mso4000-dpo4000-manual/mdo4000c-mdo4000b-mdo4000-mso4000b-dpo4000b-and-mdo3000-0
To turn on a channel and configure it to full bandwidth, look in the Vertical command group.
For triggering setup, look in the Trigger group.
For setting up measurements (which can be made visible on the screen), look into the Measurements group.