Jump to content

Check values before ScreenCapture


Recommended Posts

Dear folks.. I have the following script that I had written to capture TeamViewer QuickSupport after it had launch. It was working fine for past 1year but recently the screen capture was too "fast". It could not capture the ID portion. I had tried to use ControlGetText to check if values was in that ID box but was not successful.

Any ideas and guidience on how I could accomplish a screen shot and ensuring there is a ID before screen capture.

Thank you in advance.

#include <ScreenCapture.au3>
#Include <Date.au3>

$TVQSPATH = @ScriptDir & "\TeamViewerQS.exe"
$Date = (_DateTimeFormat( _NowCalc(),2))
$Date2 = @MDAY & @MON & @YEAR
$Time = _NowTime()
$FName = @ScriptDir & "\TVID" & $Date2 & ".jpg"

;Run TeamViewer
Run($TVQSPATH)
WinWaitActive ("TeamViewer" , "Ready to connect (secure connection)")
$TVS =  WinGetHandle("[active]")
;Capture window
_ScreenCapture_CaptureWnd ($FName, $TVS)
WinSetState ( $TVS , "" , @SW_MINIMIZE)
Edited by dion
Link to comment
Share on other sites

Dear folks.. I have the following script that I had written to capture TeamViewer QuickSupport after it had launch. It was working fine for past 1year but recently the screen capture was too "fast". It could not capture the ID portion. I had tried to use ControlGetText to check if values was in that ID box but was not successful.

Any ideas and guidience on how I could accomplish a screen shot and ensuring there is a ID before screen capture.

Thank you in advance.

#include <ScreenCapture.au3>
#Include <Date.au3>

$TVQSPATH = @ScriptDir & "\TeamViewerQS.exe"
$Date = (_DateTimeFormat( _NowCalc(),2))
$Date2 = @MDAY & @MON & @YEAR
$Time = _NowTime()
$FName = @ScriptDir & "\TVID" & $Date2 & ".jpg"

;Run TeamViewer
Run($TVQSPATH)
WinWaitActive ("TeamViewer" , "Ready to connect (secure connection)")
$TVS =  WinGetHandle("[active]")
;Capture window
_ScreenCapture_CaptureWnd ($FName, $TVS)
WinSetState ( $TVS , "" , @SW_MINIMIZE)

WinWaitActive("TeamViewer","Connecting to Keep")
WinWaitActive("TeamViewer","Ready to connect")
$test = ControlGetText("TeamViewer","Ready to connect","[CLASS:Edit; INSTANCE:1]")
MsgBox(0,"",$test)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...