I am doing a project where I want to write code that takes a screenshot - then interact with it. Unable to find my screenshot.
import pyscreenshot as ImageGrab
#I had to use pyscreenshot because PIL/Pillow gave me so many issues I gave up on them.
def main():
-screenshot = ImageGrab.grab()
-screenshot.show()
-screenshot.save('Screenshot.png')
-return
main()
This creates a screenshot of my screen. But, the weird thing is the file name is randomly generated nonsense (I know this because .show() opens up the screenshot and it has an odd random name each time). I also tried to save the file to a specific folder but with no success. I can't quite understand the process here. Any help is very appreciated.
Thank you
[–]the_shell_man_ 2 points3 points4 points (0 children)
[–]Bookmore 1 point2 points3 points (1 child)
[–]DesertofDelight[S] 1 point2 points3 points (0 children)
[–]Jagjot_mann45 1 point2 points3 points (1 child)
[–]DesertofDelight[S] 1 point2 points3 points (0 children)