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
Difference between revisions of "iimGetLastExtract()"
(→Syntax) |
|||
Line 9: | Line 9: | ||
=== Parameters === | === Parameters === | ||
− | + | Since version 6 this commands supports the option to return extraction information separated, so no further parsing and splitting is required: | |
+ | |||
+ | iimInit () - returns all extracted information at once | ||
+ | iimInit (0) - returns all extracted information at once | ||
+ | iimInit (1) - returns 1st extracted data | ||
+ | iimInit (2) - returns 2nd extracted data... | ||
+ | |||
+ | Note: Due to a bug in the current version of the Scripting Interface (build 6000818) the data is returned as follows: | ||
+ | |||
+ | iimInit () - returns all extracted information at once | ||
+ | iimInit (0) - returns 1st extracted data | ||
+ | iimInit (1) - returns 2nd extracted data... | ||
+ | This will be fixed with the next update. | ||
=== Examples === | === Examples === |
Revision as of 13:04, 14 September 2007
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 commands supports the option to return extraction information separated, so no further parsing and splitting is required:
iimInit () - returns all extracted information at once iimInit (0) - returns all extracted information at once iimInit (1) - returns 1st extracted data iimInit (2) - returns 2nd extracted data...
Note: Due to a bug in the current version of the Scripting Interface (build 6000818) the data is returned as follows:
iimInit () - returns all extracted information at once iimInit (0) - returns 1st extracted data iimInit (1) - returns 2nd extracted data... This will be fixed with the next update.
Examples
Display the extracted results from a macro (Visual Basic Script example):
Dim imacros, iret Set imacros = CreateObject("InternetMacros.iim") iret = imacros.iimInit() iret = imacros.iimPlay("myextractmacro") MsgBox "The extract was: "+ vbNewline + _ imacros.iimGetLastExtract() iret = imacros.iimExit()