Bug with SAVEAS TYPE=EXTRACT in iMacros for Firefox 10.0.2

Discussions and Tech Support related to the iMacros Firefox Add-on, including the built-in Javascript scripting interface for playing .js files.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
Post Reply
Tom, Tech Support
Posts: 3413
Joined: Mon May 31, 2010 4:59 pm

Bug with SAVEAS TYPE=EXTRACT in iMacros for Firefox 10.0.2

Post by Tom, Tech Support » Wed Feb 13, 2019 1:55 pm

Hi everyone,

The following bug just came to our attention that affects iMacros for Firefox Personal Edition users:

When calling SAVEAS to write extracted data to an output file, iMacros is not appending a newline. So subsequent calls to SAVEAS to write data to the same file result in all the data being added to the same line (the last line in the file).

For example:

Code: Select all

VERSION BUILD=10021450
SET !EXTRACT Line1
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
SET !EXTRACT Line2
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
The result of running this macro should be a file that contains:

Line1
Line2

But the following is written instead:

Line1Line2

This issue has been logged for the development team and I will update this thread with additional information as it becomes available.
Regards,

Tom, iMacros Support
Tom, Tech Support
Posts: 3413
Joined: Mon May 31, 2010 4:59 pm

Re: Bug with SAVEAS TYPE=EXTRACT in iMacros for Firefox 10.0.2

Post by Tom, Tech Support » Thu Feb 14, 2019 8:06 pm

Quick update and further clarification on this issue... It was determined that this issue only occurs when saving data that consists of just one column. So one way to mitigate the problem would be to always include at least two columns in the output, for example:

Code: Select all

SET !EXTRACT Line1
ADD !EXTRACT ""
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
SET !EXTRACT Line2
ADD !EXTRACT ""
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
This results in the following being written:

Line1,
Line2,

Where the second column is simply an empty value.

Another way to mitigate the problem without writing a second column would be to append a newline to the extracted data before saving it:

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:title EXTRACT=TXT
SET !EXTRACT "{{!EXTRACT}}\n"
SAVEAS TYPE=EXTRACT FOLDER=* FILE=*
The priority on fixing this bug has been subsequently lowered since it is only occurring for a specific case (single-column output) and there is a viable workaround in the meantime.
Regards,

Tom, iMacros Support
Post Reply