USSSA softball rule. I know different but a lot rules mirror baseball.
As long as the ball is not in play (Umpires puts ball in play for pitcher to pitch to batter) the batter may bat from either batters box. The batter may not switch to another batters box once the ball has been put in play or the pitch has been released.