Conditional SAVEAS

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Posts: 9713
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Conditional SAVEAS

Post by chivracq » Wed Aug 08, 2018 4:22 am

halenrauch wrote:Hi,

I am looking for a piece of code performing a
SAVEAS command only if the length of text to be stored exceeds a predefined threshold
(the length of text is an indicator for whether the EXTRACT is of interest to be stored, at all).

I would guess that the piece of code could roughly look like following line:

SET !VAR4 EVAL("var s='{{!EXTRACT}}'; if(s.length < 5000){var x=\"\";}else{SAVEAS TYPE=EXTRACT FOLDER=E:\\username FILE=filename.csv};")

There are parallels to

However, I am still not firm enough in iMacros and JavaScript for creating runnable code starting from this and my sketchy ideas.

The searched piece of code should work at least on iMacros for FF 9.0.3, FF 55.0.3 (32-bit), and Win 7 Version 6.1.
Fake User doing C&P of some older Post..., from Vietnam of course...!

[halenrauch] [] [Vietnam]

Original Post:
- Conditional SAVEAS

Thread has been reported to be deleted + User & IP to be banned... :roll:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply