3 Part Name

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
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
markgpayne
Posts: 1
Joined: Fri Jul 17, 2015 9:13 pm

3 Part Name

Post by markgpayne » Fri Jul 17, 2015 9:21 pm

I have a Name

Mr Billy Bunter

The only parts i need is Billy and Bunter = here is the code i have but i cant get it to work---

TAG POS=1 TYPE=H3 ATTR=TXT:* EXTRACT=TXT
SET FirstName EVAL("var s=\"{{!EXTRACT}}\"; s.split(\" \", 1);")
SET Index EVAL("var s=\"{{!EXTRACT}}\"; s.indexOf(\" \");")
ADD Index 1
SET LastName EVAL("var s=\"{{!EXTRACT}}\"; var d=\"{{Index}}\"; s.substr(d);")
PROMPT {{FirstName}}<SP>{{LastName}}

I WOULD REALLY LOVE FOR SOMEONE TO HELP ME PLEASE, rather than just give me the answer can you try to explain it also?

Thanks in advance

Mark
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: 3 Part Name

Post by chivracq » Sat Jul 18, 2015 2:03 pm

markgpayne wrote:I have a Name

Mr Billy Bunter

The only parts i need is Billy and Bunter = here is the code i have but i cant get it to work---

Code: Select all

TAG POS=1 TYPE=H3 ATTR=TXT:* EXTRACT=TXT
SET FirstName EVAL("var s=\"{{!EXTRACT}}\"; s.split(\" \", 1);")
SET Index EVAL("var s=\"{{!EXTRACT}}\"; s.indexOf(\" \");")
ADD Index 1
SET LastName EVAL("var s=\"{{!EXTRACT}}\"; var d=\"{{Index}}\"; s.substr(d);")
PROMPT {{FirstName}}<SP>{{LastName}}
I WOULD REALLY LOVE FOR SOMEONE TO HELP ME PLEASE, rather than just give me the answer can you try to explain it also?

Thanks in advance

Mark
CIM...! :mrgreen:

I'll give you some explanation if you mention your FCI...

There are probably several Solutions btw... Is it always "Mr xxx yyy" or can you have "Mrs xxx yyy" or "Miss xxx yyy" or even "Mr xxx yyy zzz" or just "xxx yyy"...?
- (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