I feel like this question was answered many times before, but i can't find anything.
I have a script which takes a text as command line argument and then generates images with the text in it. It generates image for every word enterd in to the command line but I don't know how to save them. I want to save them like this; first image would be saved as 0001.png, the second one as 0002.png and so on, how can I do this?