trademaid Posted May 1, 2008 Share Posted May 1, 2008 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 Link to comment Share on other sites More sharing options...
MerkurAlex Posted May 1, 2008 Share Posted May 1, 2008 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] Link to comment Share on other sites More sharing options...
covaks Posted May 1, 2008 Share Posted May 1, 2008 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) Link to comment Share on other sites More sharing options...
trademaid Posted May 1, 2008 Author Share Posted May 1, 2008 problem solved. thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now