Jump to content
Sign in to follow this  
Lazycat

Capture Screen dll

Recommended Posts

NELyon

It's more the DLL than the actual au3 code.

Share this post


Link to post
Share on other sites
GregN

Hi Everyone,

I hope somebody can help me with this...

I'm trying to create a short script that opens a few programs (one at a time) and takes screenshots of each program and then closes each program.

This DLL is really helping me get away from automating a printscreen and paste to mspaint everytime which seemed to have been broken when I moved to Vista.

The only issue I have now is it only takes full screenshots. Is there any easy way to use this great DLL to only take a screenshot of the active window?

Greg

Share this post


Link to post
Share on other sites
GregN

Is there any easy way to use this great DLL to only take a screenshot of the active window?

I figured it out, all that was necessary was to do a WinGetPos() and use the array when using the DLL. Works great now!

Share this post


Link to post
Share on other sites
MrCreatoR

Hi Lazycat, thank you a lot for this great Dll, i defenetly will use it somethime...

I have a question:

Is it possible to make that this Dll also will have the option to save image-data that already was captured by another program to file?

Please, see here my main intention about this question. Thanks.


 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Share this post


Link to post
Share on other sites
BigDaddyO

If I compile the Capture_Demo.au3 using the latest Beta version I get an Error message. Any idea why?

Screenshot:

Thanks,

Mike

post-1387-1175624993_thumb.jpg


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites
Lazycat

MsCreatoR

I see, problem already solved... that good, because no plans to add something here - now capturing can be done with native au3 code.

MikeOsdx

Hm, probably in beta version explicit cdecl setting is mandatory. Try change calls this way:

DllCall("captdll.dll", "int:cdecl", "CaptureScreen", "str", "dump_full.jpg", "int", 85)
DllCall("captdll.dll", "int:cdecl", "CaptureRegion", "str", "dump_partial.bmp", "int", 100, "int", 100, "int", 300, "int", 200, "int", -1)

Share this post


Link to post
Share on other sites
BigDaddyO

MikeOsdx

Hm, probably in beta version explicit cdecl setting is mandatory. Try change calls this way:

DllCall("captdll.dll", "int:cdecl", "CaptureScreen", "str", "dump_full.jpg", "int", 85)
DllCall("captdll.dll", "int:cdecl", "CaptureRegion", "str", "dump_partial.bmp", "int", 100, "int", 100, "int", 300, "int", 200, "int", -1)

That works,

Thanks


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites
BigDaddyO

LazyCat, or anybody else.

Is there a way to have this capture the Mouse pointer also?

I just went to use my ScreenCap utility to make an animated gif as a tutorial and noticed that the Mouse pointer is not showing on any screenshot.

Thanks,

Mike


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites
guwguw

I have it running successfuly under XP, but have not been able to take screenshots under Windows Vista.

Is anybody here using capturedll under Vista?

Share this post


Link to post
Share on other sites
BigDaddyO

I have it running successfuly under XP, but have not been able to take screenshots under Windows Vista.

Is anybody here using capturedll under Vista?

I just finished testing it on Windows Vista Enterpise edition. If you are trying to save the files to any folder outside the dll's own folder you may need to launch the script with Admin Privlidges.

Mike


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites
November

Hi all,

I made another program with this awsome dll file.

But for some reason the program runs nice in c:\ but in the desktop dont. :S

weird... because if i launch F5 in Scite all run smoothly!

Is this a compile bug? A bug?

Can anyone help me out?

Cheers

Screen_Capture.zip


Old Scriptology

Visual Ping 1.8 - Mass Ping Program with export to txt delimited.

Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code.

Desktop 2 RGB - Pick a color in the desktop and get the RGB code.

ShootIT 1.0 - Screen Capture full and partial screen

[font="'Arial Black';"]Remember Remember The Fifth of November.[/font]

Share this post


Link to post
Share on other sites
Espada

Excellent, unfortunately, it doesn't work with 3.2.4.0. Oh well back to 3.2.2.0 for a while.

Share this post


Link to post
Share on other sites
Runman

uhm ;D

well Lazycat thanx for the Dll

But have 1 question if i may ^^ or to all

Now, if i press Printscreen the pics will go to the directory where is Script is. how can i make it so the pics will go to a default folder...

so if i make a folder on the desktop, and i press printscreen with your dll is it possible to get the pic in that folder without the dll or the script placed in that folder?

man that would be awesome ^^

DllCall("captdll.dll", "int:cdecl", "CaptureScreen", "str",  @MON & @MDAY & @YEAR & @HOUR & @MIN & @SEC & ".jpg", "int", 85)

Share this post


Link to post
Share on other sites
BrewManNH

DllCall("captdll.dll", "int:cdecl", "CaptureScreen", "str",  @DesktopDir & "\Runman\" & @MON & @MDAY & @YEAR & @HOUR & @MIN & @SEC & ".jpg", "int", 85)

Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
Andreik

Very good job Lazycat. This will be very usefull.

PS: If is not a secret the source of Dll, please PM me or post it here

LE: It would be great to have possibility to capture in memory and return a HBITMAP handle.

Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites
rahuroy

I used this dll to capture but capturing screenshot doesn't work on locked workstations

Edited by rahuroy

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
Sign in to follow this  

×