This is awful tricky. Seems like a programming nightmare.
The best way, IMO, is to refer to the defensive replacement chart for the first three hitters in the next inning. If the player has no D-R listed, he stays in. Of course, this is going to require the user to be a lot more precise with his settings because, if you don't want your star removed, you'll have to leave the PH/PR/DR/Rest boxes unchecked or have your star as the only player on the D-R list. But, even then, your star hitter may have an iron glove and you want him out for the D-R when leading but not out when behind. It's almost like you need a double-switch box and, for the amount of times it will be used, that's certainly not worth adding.