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

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 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: 8528
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)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply