Jump to content

Screen Capture a PrtScn


kjcdude
 Share

Recommended Posts

I need to be able to save the print screen that was taken by someone pressing the print screen button.

I need to get the screen without having a script running during the time the print screen was generated. I need to be able to retrieve it after it's captured by windows.

Thanks.

Edited by kjcdude
Link to comment
Share on other sites

I need to be able to save the print screen that was taken by someone pressing the print screen button.

I need to get the screen without having a script running during the time the print screen was generated. I need to be able to retrieve it after it's captured by windows.

Thanks.

#include <ScreenCapture.au3>
#Include <Clipboard.au3>
Send("{PRINTSCREEN}")
$hBmp = _ClipBoard_GetData($CF_BITMAP)
_ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)
Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

#include <ScreenCapture.au3>
#Include <Clipboard.au3>
Send("{PRINTSCREEN}")
$hBmp = _ClipBoard_GetData($CF_BITMAP)
_ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)
Presumably you mean

#include <ScreenCapture.au3>
#Include <Clipboard.au3>
;Send("{PRINTSCREEN}")
$hBmp = _ClipBoard_GetData($CF_BITMAP)
_ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • 8 years later...

Hi, it doesn't work. I copied & pasted and added this line:
 

#include <ScreenCapture.au3>
#Include <Clipboard.au3> ;
Send("{PRINTSCREEN}")
$hBmp = _ClipBoard_GetData($CF_BITMAP)
if $hBmp = 0 then MsgBox (0, "$hBmp", $hBmp) ; this shows the hBmp is zero
_ScreenCapture_SaveImage (@ScriptDir & "\ClipBoard_GetData.jpg", $hBmp)

And the function _ClipBoard_GetData returns 0 and saves nothing to the file.

Also I tried to add delay after Send command or remove the Send command all together.

The _ClipBoard_Open does _not_ help either.

Edited by AutoMathic
Link to comment
Share on other sites

Considering

$CF_BITMAP = Handle to a bitmap (HBITMAP)

And there's no handle set previous to this, it's suposed to fail, imo.

Or maybe im looking at it wrong.

That being said, im not sure how we can make it work.

Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Not for me, handle is all zeroes

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...