Sign in to follow this  
Followers 0
dion

Check values before ScreenCapture

3 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

WinWaitActive("TeamViewer","Connecting to Keep")
WinWaitActive("TeamViewer","Ready to connect")
$test = ControlGetText("TeamViewer","Ready to connect","[CLASS:Edit; INSTANCE:1]")
MsgBox(0,"",$test)

Hi tlman12, it workds If have include if $var <> 0 then it do the screen capture. Thank you for the help.

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