Sign in to follow this  
Followers 0
gcue

screencapture doesnt support multiple monitors?

13 posts in this topic

i am trying to use this function here at work.. in our environment we have a varation of dual, tri, and sometimes quad monitor setups.

; Capture full screen

_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image1.jpg")

only captures the active window.. any ideas for workarounds?

thanks

Share this post


Link to post
Share on other sites



good idea.. problem is that we use printkey and by default that program fires up whenever u press ctrl/alt + printscreen.

any other ideas?

Share this post


Link to post
Share on other sites

only captures the active window.

Well, _ScreenCapture_Capture uses GetSystemMetrics if Right/Bottom is -1, try to set these parameters by your self...

_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image1.jpg", 0, 0, @DesktopWidth, @DesktopHeight)

 

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

i tried putting in those values.. no dice.

could it be that @desktopheight/@desktopwidth only take the values of the main monitor?

Share this post


Link to post
Share on other sites

could it be that @desktopheight/@desktopwidth only take the values of the main monitor?

Thats could be the reason, yes.

 

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

nice try though. anything else you could think of?

i tried exactly what you put

_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image1.jpg", 0, 0, @DesktopWidth, @DesktopHeight)

that should be the right values right? topmost , leftmost, width, height

Share this post


Link to post
Share on other sites

im trying to play with this script and get something that works (im runnning it on remote machines within our domain):

sometimes the script works and i get a screenshot out of it sometimes i dont.. im running the clipboard application on the remote machine to monitor what happens on the clipboard and i think its not working because of a clipboard issue - a screenshot for some reason, isnt getting to the clipboard sometimes

id like to use send("{printscreen}") so i can a screenshot of multiple monitors > how can i pipe it into a file wout having to use screencapture?

ClipPut("")

;_ClipBoard_Open(0)

;_ClipBoard_Empty()

;_ClipBoard_Close()

;Send("^{PRINTSCREEN}")

Send("{ALT}{PRINTSCREEN}")

_ClipBoard_Open(0) ; open clipboard is associated with the current task

$hBitmap = _ClipBoard_GetData(2) ; $CF_BITMAP

_ScreenCapture_SaveImage(@ScriptDir & "\" & @ComputerName & "_" & $filename & ".jpg", $hBitmap)

_ClipBoard_Close()

Share this post


Link to post
Share on other sites

i am trying to use this function here at work.. in our environment we have a varation of dual, tri, and sometimes quad monitor setups.

; Capture full screen

_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image1.jpg")

only captures the active window.. any ideas for workarounds?

thanks

Not a big fan of bumping up a 2+ year old topic, but I ran into this same issue today and found a decent workaround.

I found that calling the function in the following method allow the entire desktop to be captured.

_ScreenCapture_Capture($capFullPath,0,0,@DesktopWidth+@DesktopWidth,@DesktopHeight,True)

The above will work if the primary display is farthest left, there are exactly two displays, and both have identical height and width attributes. Or in other words, is set up identical to how my workstation is setup at the moment :(

There's probably a good method of identifying all of those attributes and passing in the parameters accordingly.

Share this post


Link to post
Share on other sites

This will get the full virtual screen width and height. Keep in mind that monitors with varying resolutions will return the maximum height for these values. The width returned is all monitor widths combined... unless somehow the monitors are stacked vertically which would make the situation the opposite I suppose.

;SM_CXVIRTUALSCREEN = 78
$iVScrWidth=_WinAPI_GetSystemMetrics(78)
;SM_CYVIRTUALSCREEN = 79
$iVScrHeight=_WinAPI_GetSystemMetrics(79)

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

I once downloaded this script and it works fine for my dual monitor environment.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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  
Followers 0