Jump to content

_ScreenCapture on locked workstation is black


Recommended Posts

Hi there,

I would like to send out internal statistics in my office by email every night.

Opening the program and sending the email with the picture attached is no problem. But the Screenshot is always just black, because the workstation is locked while the script is running at night (scheduled task).

Any ideas on how to solve this? There is no screensaver active.

Current code for capturing the screen:

#include <ScreenCapture.au3>

Local $hBmp
; Capture full screen
$hBmp = _ScreenCapture_Capture("")
;~ Save bitmap to file
_ScreenCapture_SaveImage("C:\Users\Administrator.SCHMITZ\Desktop\Umsatz-Mail\Statistik.png", $hBmp)

Thanks a lot for your help

 

Link to comment
Share on other sites

  • Developers
4 minutes ago, Trong said:

You can't capture the screen of a locked computer.

Guess you mean you can't capture something that isn't showing as that is what this UDF does...capture the current screen!;)
So just ensure the screen you want to capture is shown first.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...