Text Capture Library COM Server Quick Tutorial - AutoIt Sample

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

SUMMARY

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

;
; AutoIt Version: 3.0
; Language:       English
; Platform:       Win9x/NT
; Author:         skesoft.com
;

$tcServer = ObjCreate('TextCaptureLib.TextCapture')
$tcWindow = ObjCreate('TextCaptureLib.Window')

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

Sleep(3000)

$tcWindow.WindowFromCurrentPos

$strResult = $tcServer.GetText($tcWindow)

MsgBox(0, "GetIt!", $strResult)

;Finished!
 
More samples...