The renewal maintenance has officially ended for Progress iMacros effective November 30, 2023.
This Wiki site will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely, The Progress Team
iimGetExtract()
Returns the contents of the !EXTRACT variable. If the last command was iimPlay and if EXTRACT is used inside a macro iimGetLastExtract returns the extracted text. If the EXTRACT command could not find the extraction anchor then an #EANF# (Extraction Anchor Not Found) message is returned. If there is no EXTRACT command in the macro which was just played then iimGetLastExtract returns an empty string ("").
If in one macro several EXTRACT commands appear then the results are separated by the string [EXTRACT]. If complete tables where extracted, adjacent table elements are separated by the string #NEXT# and ends of table rows are delimited by the string #NEWLINE#.
Syntax
String extract = iimGetLastExtract ( [int index_of_extracted_text] )
Parameters
Since version 6 this command supports the option to return the extracted information separately, so no further parsing and splitting is required:
iimGetLastExtract () - returns all extracted information at once
iimGetLastExtract (0) - returns all extracted information at once
iimGetExtract (1) - returns 1st extracted data
iimGetExtract (2) - returns 2nd extracted data (and so on)
Examples
Display the extracted results from a macro (Visual Basic Script example):
Dim imacros, iret Set imacros = CreateObject("imacros") iret = imacros.iimInit() iret = imacros.iimPlay("myextractmacro") MsgBox "The extract was: "+ vbNewline + _ imacros.iimGetExtract () iret = imacros.iimExit()
See Also
Related forum posts:
iimInit, iimPlay, iimDisplay, iimExit, iimGetErrorText, iimTakeBrowserScreenshot