We report our experiences with conducting ptychography simultaneously with Xray fluorescence measurement using the on-the-fly mode for efficient multi-modality imaging. We demonstrate that the periodic artifact inherent to the raster scan pattern can be mitigated using a sufficiently fine scan step size to provide an overlap ratio > 70%. This allows us to obtain transmitted absorption and phase contrast images with enhanced spatial resolution from ptychography while maintaining the fluorescence imaging with continuous-motion scans on pixelated grids. This capability will greatly improve the competence and throughput of scanning probe X-ray microscopy. Scanning probe X-ray microscopy is a powerful imaging method that simultaneously evokes multiple contrast mechanisms, including absorption, phase, fluorescence, diffraction and spectroscopy. These signals carry versatile information, and enable a suite of analytical tools to reveal a comprehensive view of the specimen under study. Correlative imaging using multiple contrast mechanisms simultaneously can significantly leverage the information obtained in the images. With the steady progress on fabricating high-resolution X-ray optics [1-5] and developing advanced microscopes [6-8], the achievable spatial resolution and detection sensitivity is continuously improving. Ptychography [9], as a scanning version of coherent diffraction imaging method, shares almost the same data acquisition scheme as a typical scanning probe microscope measurement, such as scanning X-ray transmission microscope (STXM) [10]. By scanning the specimen across a confined illumination