will never learn

_ScreenCapture on locked workstation is black

4 posts in this topic

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

 

Share this post


Link to post
Share on other sites



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


Regards,
 

Share this post


Link to post
Share on other sites
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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ok Thanks. Thats sounds like a very definite answer.

Do I have to unlock the computer or are there other ways around it to make the content available to be saved as an image?

Share this post


Link to post
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

  • Similar Content

    • koenp
      By koenp
      Hello everybody,
      i wondering if anybody could help me with this strange thing.
      I am trying to include in a simple script the function _ScreenCapture
      When I run the code below everything looks fine, no error received in SciTE however nothing is happening..
      The Image.bmp is not created...
      Any idea what could be wrong or what I could check??
      thanks in advanced for any sugestion..
      Koen
      #include <ScreenCapture.au3> ; Capture full screen _ScreenCapture_SetBMPFormat(0) _ScreenCapture_Capture("C:\ko\Image.bmp")