i need know how to take screenshot by vbscript i see this function
Function CaptureScreenShot(ScreenshotPath )
'Generate Name of the Image
strimgFileName="Img\Img" & Day(Date)& Month(Date) & Year(Date) & Hour(Now) & Minute(Now) & Second(Now) &".jpg"
strImgFile= ScreenshotPath & strimgFileName
'Capture failure Screen shot
Set objPic = Sys.Desktop.Picture()
'Save captured Screen shot
ExecutionStatus = objPic.SaveToFile(strImgFile)
'Return Captured image name
CaptureScreenShot=".\" & strimgFileName
End Function
but it's not work! idk why can anyone give me a good codes to take screen shot and save it in temp dircetory thx all