Extracting Text via API

First to clarify: The status of a macro run (OK or error code) is returned via the first line of the log file. The calling scripts reads it. All the sample scripts here do it this way.

Now what you asked:

To return data, e. g. scraped text, back to the calling script are are two good ways:

(1) Via clipboard: In the macro, use store | your data | !clipboard and in your script get the data from the clipboard. See also Get value from inside powershell script - #2 by User9898

(2) Save the data as CSV and then - in your script - simply read the CSV file content. Note that there are two options to build the CSV: Line by line with csvSave and all at once with csvSaveArray.

See also: How to connect SQL Database?

1 Like