1

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

Black.JAC
  • 25
  • 1
  • 6
  • That code isn't vbscript. From Help `You cannot send the PRINT SCREEN key {PRTSC} to an application. ` –  May 30 '16 at 23:26
  • You can take a look at this vbscript ==> http://stackoverflow.com/questions/35549077/auto-screenshot-using-vbs?answertab=active#tab-top – Hackoo May 31 '16 at 13:09
  • Posible duplicate: http://stackoverflow.com/q/35549077/50447 – Rowland Shaw Apr 21 '17 at 14:45
  • Possible duplicate of [Auto Screenshot using VBS](https://stackoverflow.com/questions/35549077/auto-screenshot-using-vbs) – Rowland Shaw Jul 27 '17 at 12:12

0 Answers0