Sign in to follow this  
Followers 0
eyalsemo1

ScreenCapture for multi screens

4 posts in this topic

Hi all
I'm using 2 screens
for using  _ScreenCapture_Capture to capture full sceen to jpg.
how can I capture the secondary screen ?

TNX

Share this post


Link to post
Share on other sites



You'll have to define the area to capture yourself. I had a problem with @DesktopWidth and @DesktopHeight not working on my setup at home because my second monitor was in negative coordinates. This function should give you the coordinates, returning a struct.

; Get the Virutal screen x, y, width and height (supports getting the x, y, width, and height of computers with multiple monitors)
Func GetDesktopMetrics()
    Return _GDIPlus_RectFCreate(_WinAPI_GetSystemMetrics($SM_XVIRTUALSCREEN), _WinAPI_GetSystemMetrics($SM_YVIRTUALSCREEN), _
            _WinAPI_GetSystemMetrics($SM_CXVIRTUALSCREEN), _WinAPI_GetSystemMetrics($SM_CYFULLSCREEN))
EndFunc   ;==>GetDesktopMetrics

 

Share this post


Link to post
Share on other sites

TNX

it seems that i'm missing somthing
I have included:
#include <GDIPlus.au3>
#include <ScreenCapture.au3>
#Include <File.au3>
#Include <Array.au3>
#include <GUIConstants.au3>

and yet I'm getting $SM_XVIRTUALSCREEN... used before declaration

Eyal

Share this post


Link to post
Share on other sites

never mind I have found the solution by reading "multiple monitors" topics
thank you very much

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