Okay, this is just a short explanation as to how setup your mission with the autopilot code. The SEXPs shown in this pictures might not be up-to-date as I made them a couple of weeks ago.
First of all, you need to copy two variables into your mission file:
"AutoNavTime" and "FlyByActive"
In the "Init Mission" event (comes true on start up) you need to setup your proxies used for autopilot flybyImage 01
In the SEXP, which unhides Nav X, you need to do following
What follows is copy&paste for each navpoint, all you need to do is to modify FlyBy variable accordingly.
I hope this makes understanding the SEXP chain a bit easier. I wish I could post a template for you guys to use, but I am building missions with "Codename: Hermes" dataset and it is not compatible with the prologue.