No need for it if you have a quick and easy shortcut: Shift + PrtScr Select the area. screenshot is saved in Pictures folder.
Here is what the above code is Doing:
1. It takes a screenshot of the entire screen.
2. It saves the screenshot in the Pictures folder.
3. It opens the screenshot in the default image viewer.