There are posts in another thread that people have been booked on one airline, involuntarily rerouted on another, got miles for the flight flown, then requested and got miles for the flight booked as well. That's not what you asked and it's hard to plan for ahead of time, but it IS a way to get miles in two programs.
If you find a better one that works, please tell us!