Amit Singh
asked on
Automatic Screen shot taking code
Hello All,
I need a code (if possible in VBS or any other language, it should work on windows machine) that would automatically take screeshot after a set time interval and keep the screenshots in project-wise folders. I want this to provide my clients with screenshots of my computer so that they can see how their paid hours are being utilized.
Any help with this will be greatly appreciated.
Thanks
Amit
I need a code (if possible in VBS or any other language, it should work on windows machine) that would automatically take screeshot after a set time interval and keep the screenshots in project-wise folders. I want this to provide my clients with screenshots of my computer so that they can see how their paid hours are being utilized.
Any help with this will be greatly appreciated.
Thanks
Amit
ASKER
Thank you very much Kulboy, I tried it in a .vbs file but could not make it work (I'm not a programmer although can make small changes to the code) could you please provide me with complete piece of code that I can use in a .vbs file and run it by double clicking it.
Thanks a lot for all your help!
Amit
Thanks a lot for all your help!
Amit
this should do the trick:
Set ApplicationScreenShot = AppWindow.Picture
Set DesktopScreenshot = Sys.Desktop.Picture
Call ApplicationScreenshot.SaveToFile("C:\Folder1\AppScreenshot.jpg")
Call DesktopScreenshot.SaveToFile("C:\Folder2\DesktopScreenshot.jpg")
ASKER
when I run your code in a vbs file I'm getting this error: "Object Required 'AppWindow'" and Object required 'Sys'
Ypu have to replace AppWindow with the full name of the object that corresponds to your application window
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot! It works however I want everything to happen in the background without showing anything to the user.
I mean it should take screen shot and save it into a folder without showing anything to the user or requiring any input from the user.
Also I want to save each screenshot as a .jpg file.
I mean it should take screen shot and save it into a folder without showing anything to the user or requiring any input from the user.
Also I want to save each screenshot as a .jpg file.
ASKER
Extremely helpful!
To capture a desktop screenshot, use the Sys.Desktop.Picture method. To save the resulting image to a file, use its SaveToFile method:
Open in new window