Match Image by returning image name?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Match Image by returning image name?

by CosmicInspector on Sun May 21, 2017 3:39 am

Good day all, hope everyone's doing well.

I'm trying to match an image from a line-up of specifically named images (They're always 1, 2, 3 ... -9) to the showcased image.

See the image below. I was thinking of using XY Clicks and some kind of "Save as" to detect the names, store the first one as the variable and add an, "if" function to sus out the image with the same name.
matchimage.jpg
matchimage.jpg (6.58 KIB) Viewed 1047 times

I gave it a go but I failed miserably... Not ashamed to say, I could really do with some assistance from you boffins! =D

Any and all input will not go unappreciated believe me!
Looking forward to the feedback!

Until then,
C.I


| iMacros v8.9.7
| Firefox 36.0.1
| Windows 7 Home Premium
CosmicInspector
 
Posts: 5
Joined: Sun May 21, 2017 2:55 am

Re: Match Image by returning image name?

by chivracq on Sun May 21, 2017 6:37 am

CosmicInspector wrote:
Code: Select all
| iMacros v8.9.7
| Firefox 36.0.1
| Windows 7 Home Premium

Good day all, hope everyone's doing well.

I'm trying to match an image from a line-up of specifically named images (They're always 1, 2, 3 ... -9) to the showcased image.

See the image below. I was thinking of using XY Clicks and some kind of "Save as" to detect the names, store the first one as the variable and add an, "if" function to sus out the image with the same name.
matchimage.jpg

I gave it a go but I failed miserably... Not ashamed to say, I could really do with some assistance from you boffins! =D

Any and all input will not go unappreciated believe me!
Looking forward to the feedback!

Until then,
C.I

| iMacros v8.9.7
| Firefox 36.0.1
| Windows 7 Home Premium

Yeah, shouldn't be difficult to do what you want, at least if I understood correctly what you want, ah-ah...!

You don't even need to "download" anything, you can extract that Image Name from 'EXTRACT=HTM' on the Control Image (which will require some 'EVAL()' Statement to isolate the Image Name), or even simpler it's 'HREF' from 'EXTRACT=HREF', or maybe the Control Image contains some 'ALT' or 'TITLE' Attribute that you can extract directly with 'EXTRACT=ALT' or 'EXTRACT=TITLE' and you reuse that Value/Attribute with 'POS=2' or 'POS=R1' for iMacros to find directly the correct Image among the 4 ones.

Y could "do it" as well with the Letters below, by extracting on 'TXT' with ''POS=R1' ... 'POS=R4' for the 4 Letters, check for a Match with 'EVAL()' and in your Example, 'POS=R2' would be the "Winner", and you reuse 'POS=R2' for the Images.
But Method 1 is simpler, I think, it only requires 2 Lines.

EDIT: Mini-mistake...:
"or even simpler it's 'HREF' from 'EXTRACT=HTM'," should read "or even simpler it's 'HREF' from 'EXTRACT=HREF',"... (Corrected...)
Last edited by chivracq on Sun May 21, 2017 9:12 am, edited 1 time in total.
- (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...
chivracq
 
Posts: 6298
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Match Image by returning image name?

by CosmicInspector on Sun May 21, 2017 8:40 am

chivracq wrote:Yeah, shouldn't be difficult to do what you want, at least if I understood correctly what you want, ah-ah...!

You don't even need to "download" anything, you can extract that Image Name from 'EXTRACT=HTM' on the Control Image (which will require some 'EVAL()' Statement to isolate the Image Name), or even simpler it's 'HREF' from 'EXTRACT=HTM', or maybe the Control Image contains some 'ALT' or 'TITLE' Attribute that you can extract directly with 'EXTRACT=ALT' or 'EXTRACT=TITLE' and you reuse that Value/Attribute with 'POS=2' or 'POS=R1' for iMacros to find directly the correct Image among the 4 ones.

Y could "do it" as well with the Letters below, by extracting on 'TXT' with ''POS=R1' ... 'POS=R4' for the 4 Letters, check for a Match with 'EVAL()' and in your Example, 'POS=R2' would be the "Winner", and you reuse 'POS=R2' for the Images.
But Method 1 is simpler, I think, it only requires 2 Lines.


Awesome stuff!! Thanks a stack for your prompt response!! Sounds like you've picked up what I put down haha.

I'll have to do some wiki research on those! EXTRACT and EVAL are likely going to be the main ingredients here. But as for detecting a specific attribute, I presume saving the image to disk and searching for something under the Details tab would suffice or how would one go about it?

PS. I really envy those who made them Recaptcha solvers we've seen going around, I've faced so many trivial errors already and all's I'm doing is trying to build up trafficking points, or whatever else one wants to call that utter waste of time lol. If by any chance you'd like to give it a bash, the page can be found on successbux.com under, "Earn" (Top of page) --> "Traffic Exchange" (Bottom of page). Also, if you know of any short courses that cover iMacros from the top down I'd be happy to hear about it, bots are about the only thing that make this traffic exchange stuff worth my time so I recon it's worth learning.
CosmicInspector
 
Posts: 5
Joined: Sun May 21, 2017 2:55 am

Re: Match Image by returning image name?

by chivracq on Sun May 21, 2017 9:40 am

CosmicInspector wrote:Awesome stuff!! Thanks a stack for your prompt response!! Sounds like you've picked up what I put down haha.

I'll have to do some wiki research on those! EXTRACT and EVAL are likely going to be the main ingredients here. But as for detecting a specific attribute, I presume saving the image to disk and searching for something under the Details tab would suffice or how would one go about it?

PS. I really envy those who made them Recaptcha solvers we've seen going around, I've faced so many trivial errors already and all's I'm doing is trying to build up trafficking points, or whatever else one wants to call that utter waste of time lol. If by any chance you'd like to give it a bash, the page can be found on successbux.com under, "Earn" (Top of page) --> "Traffic Exchange" (Bottom of page). Also, if you know of any short courses that cover iMacros from the top down I'd be happy to hear about it, bots are about the only thing that make this traffic exchange stuff worth my time so I recon it's worth learning.

There was a mini-Mistake in my previous Reply about the 'HREF' part, I've corrected it...

You don't need to download anything, I told you. Simply extracting the 'HREF' Attribute and reusing it does the "Trick"...
I normally don't help Users use/misuse iMacros to solve Captcha Mechanisms but this one is so "trivial" that it hardly qualifies for "Captcha", ah-ah...!

I was able to have a look at your Page as you posted the URL, and here is a working Script for example, in 2 Lines like I said...:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
URL GOTO=http://www.successbux.com/gpt.php?v=entry&type=ce&s=1
FRAME NAME="surftopframe"
TAG POS=1 TYPE=IMG ATTR=SRC:http://www.successbux.com/clickimages/*.png EXTRACT=HREF
TAG POS=R1 TYPE=IMG ATTR=SRC:{{!EXTRACT}}
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10-x64.)

And well, to learn iMacros, pfff, I don't know of any "easy" Tutorial, simply play with it yourself, review the Code that gets recorded and which is not difficult to understand, run and have a look at the Demos, read the Documentation from the Wiki and read a few Pages of Threads on the Forum and you'll quickly become an "Expert", ah-ah...! :wink:
- (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...
chivracq
 
Posts: 6298
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Match Image by returning image name?

by CosmicInspector on Tue May 23, 2017 12:21 am

chivracq wrote:There was a mini-Mistake in my previous Reply about the 'HREF' part, I've corrected it...

You don't need to download anything, I told you. Simply extracting the 'HREF' Attribute and reusing it does the "Trick"...
I normally don't help Users use/misuse iMacros to solve Captcha Mechanisms but this one is so "trivial" that it hardly qualifies for "Captcha", ah-ah...!

I was able to have a look at your Page as you posted the URL, and here is a working Script for example, in 2 Lines like I said...:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
URL GOTO=http://www.successbux.com/gpt.php?v=entry&type=ce&s=1
FRAME NAME="surftopframe"
TAG POS=1 TYPE=IMG ATTR=SRC:http://www.successbux.com/clickimages/*.png EXTRACT=HREF
TAG POS=R1 TYPE=IMG ATTR=SRC:{{!EXTRACT}}
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10-x64.)

And well, to learn iMacros, pfff, I don't know of any "easy" Tutorial, simply play with it yourself, review the Code that gets recorded and which is not difficult to understand, run and have a look at the Demos, read the Documentation from the Wiki and read a few Pages of Threads on the Forum and you'll quickly become an "Expert", ah-ah...! :wink:


Ahh you're legendary! Thanks so much for taking the time bud, that method didn't work for me but you certainly got the ball rolling! This is how I managed to get it to work, pretty daaaaamn smoothly if i may say so myself. =D

Code: Select all
VERSION BUILD=8970419 RECORDER=FX
SET !TIMEOUT_PAGE 10
SET !TIMEOUT_STEP 2
SET !TIMEOUT_TAG 2
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO

TAB T=1
URL GOTO=http://www.successbux.com/index.php?view=earn
WAIT SECONDS=2

TAG POS=1 TYPE=H1 ATTR=TXT:Traffic<SP>Exchange
WAIT SECONDS=3

FRAME NAME="surftopframe"
TAG POS=1 TYPE=IMG ATTR=SRC:http://www.successbux.com/clickimages/*.png EXTRACT=HREF
TAG POS=R1 TYPE=IMG ATTR=SRC:{{!EXTRACT}}

(Tested on iMacros v8.9.7 for FF 36.0.1 running Win7 Home Premium)

Ooooh DEMOS?? Gosh, where is my head at hahaha! I'll deffs be looking at those!! and The Forums too, just not so keen on reading, never been lol. But yeah i get it, trial and error, either experienced or witnessed is the worlds best teacher. =P

Anyhoo, thanks again hey! *Hands you an imaginary beer* Cheers to good people!
CosmicInspector
 
Posts: 5
Joined: Sun May 21, 2017 2:55 am

Re: Match Image by returning image name?

by chivracq on Tue May 23, 2017 2:22 am

CosmicInspector wrote:Ahh you're legendary! Thanks so much for taking the time bud, that method didn't work for me but you certainly got the ball rolling! This is how I managed to get it to work, pretty daaaaamn smoothly if i may say so myself. =D

Code: Select all
VERSION BUILD=8970419 RECORDER=FX
SET !TIMEOUT_PAGE 10
SET !TIMEOUT_STEP 2
SET !TIMEOUT_TAG 2
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO

TAB T=1
URL GOTO=http://www.successbux.com/index.php?view=earn
WAIT SECONDS=2

TAG POS=1 TYPE=H1 ATTR=TXT:Traffic<SP>Exchange
WAIT SECONDS=3

FRAME NAME="surftopframe"
TAG POS=1 TYPE=IMG ATTR=SRC:http://www.successbux.com/clickimages/*.png EXTRACT=HREF
TAG POS=R1 TYPE=IMG ATTR=SRC:{{!EXTRACT}}

(Tested on iMacros v8.9.7 for FF 36.0.1 running Win7 Home Premium)

Ooooh DEMOS?? Gosh, where is my head at hahaha! I'll deffs be looking at those!! and The Forums too, just not so keen on reading, never been lol. But yeah i get it, trial and error, either experienced or witnessed is the worlds best teacher. =P

Anyhoo, thanks again hey! *Hands you an imaginary beer* Cheers to good people!

Ah-ah...!, come once to Amsterdam (NL) and you'll have a chance to get me a real Beer, re-ah-ah...! 8)
Glad I could help...! :D
- (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...
chivracq
 
Posts: 6298
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Match Image by returning image name?

by CosmicInspector on Wed May 24, 2017 2:54 am

[/quote]
Ah-ah...!, come once to Amsterdam (NL) and you'll have a chance to get me a real Beer, re-ah-ah...! 8)
Glad I could help...! :D[/quote]

Hahahah! If only travel was as easy as a snap of the fingers hey! I could really do with a nice German crafted brew! =D

But unfortunately my numbers wouldn't even cover the cost of that beer ;)
meh.jpg


One day maybe!! :lol:
CosmicInspector
 
Posts: 5
Joined: Sun May 21, 2017 2:55 am


Return to General Support & Discussions

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

-->