Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
;Setup the Active X control first ;To install TxtrCtl, using regsvr32, use the following command line: regsvr32 TxtrOCX.DLL. ;To uninstall TxtrCtl, using regsvr32, use the following command line: regsvr32 /u TxtrOCX.DLL ;Change to your textract directory dirchange("d:\test") ;Look for the default Textract INI file if !FileExist("Textract.INI ") then message("Please ReInstall","Textract.INI Not Found - Exiting") exit end if ;Find the window of the program you are looking for if WinExist("~Program Dictionary") == @TRUE Then winid1 = WinIdGet("~Program Dictionary") else message("","Can't Find the Proper Screen") Exit end if ;Open the object Text Txtr = ObjectOpen("TxtrCtl.TxtrCtl") rc = Txtr.Init ;look and see if the pattern file has been made if !FileExist("Textract.PAT") then ;Pattern File rc = Txtr.Build(0) ;builds the database without prompt ;rc = Txtr.Build(1) ;prompts to build the database end if ;send some keys to the application to get to a particular screen ;SendKeysTo(winid1,"^AF") ; ;Activate your window WinActivate (winid1) pos = WinPlaceGet(@NORMAL,winid1) ;get the coordinates of your window ax = ItemExtract(1,pos," ") ay = ItemExtract(2,pos," ") cx = ItemExtract(3,pos," ") cy = ItemExtract(4,pos," ") ;Read your screen rc = Txtr.ReadScreen(ax,ay,cx,cy) ;Get the text Output = Txtr.Text ObjectClose(Txtr) ;Display your results message("ok",Output) exit
Article ID: W16075
File Created: 2009:06:25:09:40:12
Last Updated: 2009:06:25:09:40:12