Extracting and comparing variable data.

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
jacko529
Posts: 2
Joined: Sat Apr 15, 2017 8:30 am

Extracting and comparing variable data.

Post by jacko529 » Sat Apr 15, 2017 2:10 pm

Hi everyone,

I am new to this and I was wondering if it is possible to complete this action.

I want to set up a web macro on firefox to output the matching results of the data I input.

On a webpage I have to frequently enter a lot of data into three text boxes, all the data are just a series of random numbers pretty much, the goal of the macro would be to extract all the data from box 1 and box 3 and output which of the numbers numbers match, after this though, the numbers of which are in the outpoint (the matching numbers from box 1 & 3) if any of these numbers also show up in box 2 to take those away those away from the final output. An example of this I will show below.

Box 1
12345 3233 23232 3232 2323 232 23233
54543 54543 545 5455 54543 54557 7776
Box 2
3233 23232 5454 6565 65657
Box 3
12345 3233 23232 3232 2323 232 23233
7477 7372 87499 9937 3773 9922 9933

So the final output would be:- 12345 3232 2323 232 23233

I hope this makes sense :P if anyone could help or point me in the right direction, would much appreciated it.

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

Re: Extracting and comparing variable data.

Post by chivracq » Sat Apr 15, 2017 4:10 pm

jacko529 wrote:Hi everyone,

I am new to this and I was wondering if it is possible to complete this action.

I want to set up a web macro on firefox to output the matching results of the data I input.

On a webpage I have to frequently enter a lot of data into three text boxes, all the data are just a series of random numbers pretty much, the goal of the macro would be to extract all the data from box 1 and box 3 and output which of the numbers numbers match, after this though, the numbers of which are in the outpoint (the matching numbers from box 1 & 3) if any of these numbers also show up in box 2 to take those away those away from the final output. An example of this I will show below.

Box 1

Code: Select all

12345 3233 23232 3232 2323 232 23233
54543 54543 545  5455   54543 54557 7776
Box 2

Code: Select all

3233 23232 5454 6565 65657
Box 3

Code: Select all

12345 3233 23232 3232 2323 232 23233
7477 7372 87499 9937 3773 9922 9933 
So the final output would be:-

Code: Select all

12345 3232 2323 232 23233
I hope this makes sense :P if anyone could help or point me in the right direction, would much appreciated it.

:)
FCIM...! :mrgreen:

Hum..., miam-miam-interesting Scenario, ah-ah...! :D
And yep, everything is possible with iMacros...! :shock:

I see a "firefox" mentioned somewhere in your Description, but mention your FCI (read my Sig, Required Info to include in your Post when you open a Thread, many Commands are not implemented for all Browsers/Versions...) for me to do any "Thinking"..., well, I would already have a few "Ideas", ah-ah...!

And hum, I will have a few Qt's as well:
- Are the Numbers of Values for Boxes 1-2-3 constant (ie always [14-5-14]) or variable and/or is there a Max-Nb...?
- I see some extra Spaces in Box_1 and some Trailing Space in Box_3, is this "correct" or is this a Typo...?
- Do Boxes 1 and 3 get extracted with the Soft Return in the middle...?

Might be "easier" if you could post the URL... :idea:
- (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...
jacko529
Posts: 2
Joined: Sat Apr 15, 2017 8:30 am

Re: Extracting and comparing variable data.

Post by jacko529 » Sun Apr 16, 2017 8:31 am

Hi chivracq,

Thank you so much for your reply in this matter. I apologise for the lack on information, I am running windows 10, Firefix ESR 45.8.0 and Imacros 9.03.

To answer your questions, yes that was a typo and there is no trailing off usually (typo). The numbers are constant, there is no max number but usually they are anywhere between 4 and 7 digits.

I have managed to extract the data from box 1 & 3 and then using the EVAL function able to find a match but for the last part, subtracting the numbers in box two from the final output is the major trouble.

A bit of back story before trying to use imacros I was doing this by hand using the google lite toolbar and then just highlighting the numbers to find which matched.

Once again, thanks. :)
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extracting and comparing variable data.

Post by chivracq » Sun Apr 16, 2017 10:31 pm

jacko529 wrote:Hi chivracq,

Thank you so much for your reply in this matter. I apologise for the lack on information, I am running

Code: Select all

windows 10, Firefix ESR 45.8.0 and Imacros 9.03.
To answer your questions, yes that was a typo and there is no trailing off usually (typo). The numbers are constant, there is no max number but usually they are anywhere between 4 and 7 digits.

I have managed to extract the data from box 1 & 3 and then using the EVAL function able to find a match but for the last part, subtracting the numbers in box two from the final output is the major trouble.

A bit of back story before trying to use imacros I was doing this by hand using the google lite toolbar and then just highlighting the numbers to find which matched.

Once again, thanks. :)
OK, good for FCI... :D
Always mention that Info when you open a Thread, I normally don't read and certainly don't answer if that Required Info is missing...
and hum, it's not "Firefix" but rather "Firebreak", ah-ah...!, as since FF29 I think, nearly each FF Version has broken stg in iMacros for FF, oops...!

v8.9.7 is currently the "stable" Version, working on FF48-52 and maybe FF53 as well, one User reported using FF53 recently...
But hum, if using FF45 ESR, you should definitely rather use v8.9.7 than v9.0.3 for FF, my "Advice", ah-ah...! 8)
I mention "FF48-52" because FF48 introduced Multi-Process and it was breaking v8.9.7 if enabled and Dev released v9.0.3 to support Multi-Process but v9.0.3 (based on v9.0.2 and v9.0.1) is pretty Buggy and was never really tested, while v8.9.7 was already working fine since FF42 I think... => "The" Version to use on FF45.

Well, about "Max Nb", I was meaning "Max Nb of Entries in one Box", I have the feeling you mean "Max Value for one Entry" in your Reply...
Hum, about "they are anywhere between 4 and 7 digits", I see 2 Entries with only 3 Digits (232, 545). :?

You didn't react about my "Might be "easier" if you could post the URL... :idea:"...?

If you already have a (partial) Solution for the first 2 Boxes (Boxes 1 and 3), already post your Script with what you have and post the exact Content of your 'EVAL()' Vars, I have several "Full Solutions" in mind but it's probably a bit useless for you and me if I mention them, either you'll try to make one "fit" your own Solution which will probably won't work or be cumbersome or you'll start over from the beginning while you are maybe already very close to a working Full Solution with little/less Effort...
- (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