We theoretically investigate the selection of electron quantum trajectories in the macroscopic high harmonic generation (HHG) with few-cycle, 1200-nm near-infrared lasers by changing gas pressure. The selected continuous HHG spectra are able to support the isolated attosecond pulses (IAPs) in the soft x rays. The time-frequency analysis of high harmonics indicates that the long-trajectory electron emissions are dominant at lower pressure and the short-trajectory emissions are suffered at higher and optimal pressure. The quantitative analysis of phase mismatch uncovers the physical origin of dynamic changes in the harmonics fields after propagation in the gas medium. Furthermore, we check the dependency of IAP on the carrier-envelope phase (CEP) of laser pulses and find that IAP can still be obtained even if the CEP changes.