Jump to content
Sign in to follow this  
trademaid

screen caputure

Recommended Posts

trademaid

The following capture works fine, but I need to return the mose to the current active window before the screen shot.

How do I find the current window?

#include <ScreenCapture.au3>

$user="Alpha"

$tws="vmpz - vmrpz.z.biz - Remote Desktop"

$trades="Trades U35281"

$account="Account U35281"

for $x = 1 to 8

WinActivate($tws,"")

Opt("SendKeyDelay", 150) ;150

sleep(3000)

;WinSetState ( $trades, "", @SW_MAXIMIZE )

_ScreenCapture_SetJPGQuality(45)

$handel = WinGetHandle($tws)

$SsTake = _ScreenCapture_CaptureWnd("", $handel)

_ScreenCapture_SaveImage("d:\5\trades-" & $user & "-" & @YEAR & @MON & @MDAY & @sec & ".jpg", $SsTake)

next

Share this post


Link to post
Share on other sites
MerkurAlex

wingetactive('') i believe will work im not on my windows computer at the mpoment so i cannot test.


[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Share this post


Link to post
Share on other sites
covaks

Get a handle to the active window, then re-activate it after you do whatever it is you want to do.

eg:

opt("WinTitleMatchMode",4)

$hPrevWindow = WinGetHandle("active")

; Do whatever

WinActivate($hPrevWindow)

Share this post


Link to post
Share on other sites
trademaid

problem solved. thank you

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  

×