How to reserve a place in a cell (csv) if the script does not find anything.

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
hirurgrrr1984
Posts: 7
Joined: Sat Dec 04, 2010 5:45 pm

How to reserve a place in a cell (csv) if the script does not find anything.

Post by hirurgrrr1984 » Tue May 14, 2019 1:13 pm

Hello

Mozilla-49
imacros 8.9.7

Code: Select all

TAB T=1
URL GOTO=http://........

SEARCH SOURCE=REGEXP:"\"bus\"(.[^\"]*)\"" EXTRACT="$1"
SEARCH SOURCE=REGEXP:"\"car\"(.[^\"]*)\"" EXTRACT="$1"
SEARCH SOURCE=REGEXP:"\"tro\"(.[^\"]*)\"" EXTRACT="$1"

SAVEAS TYPE=EXTRACT FOLDER=C:\ FILE=Address.csv
If the script does not find the second value ("car\") it saves to csv
"1", "3"

I need so
"1","","3"
or
"1"," #EANF#","3"

May need to change browser or macro version
Help me please.
hirurgrrr1984
Posts: 7
Joined: Sat Dec 04, 2010 5:45 pm

Re: How to reserve a place in a cell (csv) if the script does not find anything.

Post by hirurgrrr1984 » Wed May 15, 2019 8:34 am

Maybe someone knows how to add some character (@-$-!-%) to each extracted value,to come out
"1@","@","3@"
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to reserve a place in a cell (csv) if the script does not find anything.

Post by chivracq » Wed May 15, 2019 3:29 pm

hirurgrrr1984 wrote:
Tue May 14, 2019 1:13 pm
Hello

Mozilla-49
imacros 8.9.7

Code: Select all

TAB T=1
URL GOTO=http://........

SEARCH SOURCE=REGEXP:"\"bus\"(.[^\"]*)\"" EXTRACT="$1"
SEARCH SOURCE=REGEXP:"\"car\"(.[^\"]*)\"" EXTRACT="$1"
SEARCH SOURCE=REGEXP:"\"tro\"(.[^\"]*)\"" EXTRACT="$1"

SAVEAS TYPE=EXTRACT FOLDER=C:\ FILE=Address.csv
If the script does not find the second value ("car\") it saves to csv
"1", "3"

I need so
"1","","3"
or
"1"," #EANF#","3"

May need to change browser or macro version
Help me please.
hirurgrrr1984 wrote:
Wed May 15, 2019 8:34 am
Maybe someone knows how to add some character (@-$-!-%) to each extracted value,to come out
"1@","@","3@"
Oh...!, nice to see you finally mention your FCI, good... :D
Hum, Thread opened again in the "wrong" Sub-Forum, nothing specific to iMacros for FF only, I would think, not good... :roll:

And for the rest, tja..., use your Brain a bit maybe, everything you want should be more or less trivial for sbd who's been using iMacros for about 9 years now :shock: , takes me a few seconds to find several Solutions... :idea:

[Hum, and in case you are wondering why I'm not "too friendly" and not trying to help you, absolutely all your Threads since you joined the Forum in 2010 are all waiting for some Follow-up from your Side... You never followed up on any single one...! :shock: ]
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply