Text Capture Library COM Server Quick Tutorial - WinBatch Sample

Download the source code for this article: WinBatchSample.zip                      More samples...

SUMMARY

This code snippet shows how to use Text Capture Library as a COM server in WinBatch and get text from selected window.


; Create TextCapture library COM server object

TcWindow = CreateObject("TextCaptureLib.Window")
TcServer = CreateObject("TextCaptureLib.TextCapture")

Pause("Notice", "Three seconds after you close this dialog, the mouse pointed window will be captured.")

Timedelay(3)

TcWindow.WindowFromCurrentPos

result = TcServer.GetText(Dispatch:TcWindow)

Pause("Getit!", result)

TcWindow = 0
TcServer = 0

Exit
 
More samples...