Aug-27-2018, 09:41 AM
(Aug-27-2018, 08:47 AM)buran Wrote:import os import pyautogui import datetime d = datetime.datetime.now() for i in range(10): file_name = os.path.join('C:/Users/root/Desktop/test', 'qan-{:%Y-%m-%d %H:%M}({}).png'.format(d, i)) # file_name = os.path.join('C:/Users/root/Desktop/test', f'qan-{d:%Y-%m-%d %H:%M}({i}).png') # this is better, for python 3.6+ pic = pyautogui.screenshot(file_name)instead ofos
you can usepathlib
module
not working pro the just create one file ( qan-2018-08-27 05 ) not 10 files :)
could u please try to modify my code i need to use code that i write and understand not new one
thank u in advance