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 "iimGetExtract"
(2 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
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#. | 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 === | + | === Syntax [[Image:IMacros-icon.png|iMacros Browser]] [[Image:Ie-icon.png|IE Plug-in]] [[Image:Ff-icon.png|Firefox]] [[Image:Cr-icon.png|Chrome]] === |
String extract = iimGetExtract ( [int index_of_extracted_text] ) | String extract = iimGetExtract ( [int index_of_extracted_text] ) | ||
Line 13: | Line 13: | ||
Since version 6 this command supports the option to return the extracted information separately, so no further parsing and splitting is required: | Since version 6 this command supports the option to return the extracted information separately, so no further parsing and splitting is required: | ||
− | iimGetExtract() - returns '''all''' extracted information at once | + | iimGetExtract() - returns '''all''' extracted information at once with each item separated by the string [EXTRACT] |
− | iimGetExtract(0) - returns '''all''' extracted information at once | + | iimGetExtract(0) - returns '''all''' extracted information at once with each item separated by the string [EXTRACT] |
iimGetExtract('''1''') - returns '''1st''' extracted data | iimGetExtract('''1''') - returns '''1st''' extracted data | ||
Line 39: | Line 39: | ||
* [http://forum.iopus.com/viewtopic.php?f=8&t=6451 Loop problem with iimGetLastExtract() using VBS] | * [http://forum.iopus.com/viewtopic.php?f=8&t=6451 Loop problem with iimGetLastExtract() using VBS] | ||
− | [[iimOpen]], [[iimPlay]], [[iimDisplay]], [[iimExit]], [[ | + | [[iimOpen]], [[iimPlay]], [[iimDisplay]], [[iimExit]], [[iimGetErrorText]], [[iimTakeBrowserScreenshot]] |
Revision as of 10:34, 28 March 2017
Name change: See API enhancements for details.
Returns the contents of the !EXTRACT variable. If the last command was iimPlay and if EXTRACT is used inside a macro iimGetExtract 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 iimGetExtract 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 = iimGetExtract ( [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:
iimGetExtract() - returns all extracted information at once with each item separated by the string [EXTRACT]
iimGetExtract(0) - returns all extracted information at once with each item separated by the string [EXTRACT]
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:
iimOpen, iimPlay, iimDisplay, iimExit, iimGetErrorText, iimTakeBrowserScreenshot