PDA

View Full Version : [iMacros] Got questions? Ask me!



Chillivanilli
07-29-2014, 02:50 PM
Hi everybody.

I'm coding advanced iMacros scripts including javascript for about 7 months now and made some good scripts to earn money.
If you use iMacros yourself and need help, ask me and i'll try to help you as good as i can.

-Chillivanilli-

BeyondZero
07-29-2014, 07:06 PM
Hey!

I wanted to know if there is a code that will search for a text or image in the source code (website) and IF there is one do one thing and IF there isn't then just continue.

Asking to get code something by my self to do captchas automatically :D

Chillivanilli
07-29-2014, 07:31 PM
When you are using IF statements, javascript is required.
You can code javascript inside the .iim files, but that will be too complicated.
I try to explain it as good as i can, because you need a little coding knowledge.

You can play your .iim files with your .js file with "iimPlay("folder//macro.iim")
When a macro is played it gives back a number code, either it was successfull (1) or not successfull (<0)
A full list of the error codes can be viewed here (http://wiki.imacros.net/Error_and_Return_Codes)

To save this return code you need to assign the macro to a variable, for example:
var returnCode = iimPlay("folder//findImage");

In the .iim file you have to write the code to find the image or text.
To find a text inside a html page you can use this code:

SEARCH SOURCE=TXT:"your text here"
This will search the whole HTML page, so if you need to find a specific html code, you can also use this.

To find an image, you need to "inspect element" it.
I'll try to find the image of your userbar "GUIDE" in this example. So right click on it and click "inspect element"

You will see this http://s1.directupload.net/images/140729/v5lgundo.png
To select the image with imacros you will need this code:

TAG POS=1 TYPE=IMG ATTR=SRC:http://a2s.in/images/ranks/guide.png

Now we have the .js file which plays the macro and a variable "returnCode" which saves the return code if the macro found that image or not.

So you will need a simple if statement:

if (returnCode>0) {
iimPlay("folder//another_macro_which_is_played_when_image_is_found");
 }

else {
do something else
 }

I hope this will help you. If you have more questions feel free to ask.

Lesean13
07-29-2014, 10:14 PM
Can you do an imacros for marketglory? wondering if its possible, not asking you to do it.

Chillivanilli
07-29-2014, 10:38 PM
Can you do an imacros for marketglory? wondering if its possible, not asking you to do it.

Theoreticly yes, but this is a thread where you can ask questions belonging iMacros, not sending requests to make iMacros for you :P
But apart from this it would be too much work. I don't know marketglory, i just red that it's a browser game and there are too many things to consider.

Lesean13
07-29-2014, 10:42 PM
Chillivanilli As I said... wasnt making request, I was simply asking if it could be done, and if so, how hard would it be.

Chillivanilli
07-29-2014, 11:05 PM
Chillivanilli As I said... wasnt making request, I was simply asking if it could be done, and if so, how hard would it be.

ah ok my mistake :)
like i said its possible but i think it will be hard and long work for macing a good iMacros script which is not detectable. but i cannot say that because i don't know the game and what have to be done.

gamingmaster
01-13-2015, 09:09 PM
Chillivanilli
I need a sample new google captcha code for taking screenshot of the captcha.
The problem is the frame number keeps on changing for each refresh
sample site - btcfaucetlist.net

Chillivanilli
01-14-2015, 08:33 AM
Chillivanilli
I need a sample new google captcha code for taking screenshot of the captcha.
The problem is the frame number keeps on changing for each refresh
sample site - btcfaucetlist.net

I'll take a look into it later, i don't know right now how to do it in iMacrosi had a couple of problems with dynamic iFrames these days, too, so i don't know if i can solve it.
Now i would say as first but dirty solution: Check all frame numbers per javascript if they contain the element which you select by a id, name, whatever, and if they contain it, make a screenshot and cut out the captcha with the sizes of the element.

gamingmaster
01-14-2015, 10:09 AM
I'll take a look into it later, i don't know right now how to do it in iMacrosi had a couple of problems with dynamic iFrames these days, too, so i don't know if i can solve it.
Now i would say as first but dirty solution: Check all frame numbers per javascript if they contain the element which you select by a id, name, whatever, and if they contain it, make a screenshot and cut out the captcha with the sizes of the element.

No man... Thats not the prob now... I can bypass the frame numbers easily...
This is how its done...

TAB T=1
FRAME NAME=I0*
TAG POS=1 TYPE=DIV ATTR=ROLE:presentation&&CLASS:recaptcha-checkbox-checkmark&&TXT:
WAIT SECONDS=2
FRAME NAME=I1*
TAG POS=1 TYPE=IMG ATTR=SRC:google.com/recaptcha/*
TAG POS=1 TYPE=INPUT:TEXT ATTR=* CONTENT=zx
WAIT SECONDS=2
TAG POS=4 TYPE=DIV ATTR=TXT:Verify


Use wildcards.... But the prob verify button is disabled.... Dunno how to enable it.
I checked the javascript code. But cannot come up with possible solution

Chillivanilli
01-14-2015, 10:56 AM
No man... Thats not the prob now... I can bypass the frame numbers easily...
This is how its done...

TAB T=1
FRAME NAME=I0*
TAG POS=1 TYPE=DIV ATTR=ROLE:presentation&&CLASS:recaptcha-checkbox-checkmark&&TXT:
WAIT SECONDS=2
FRAME NAME=I1*
TAG POS=1 TYPE=IMG ATTR=SRC:google.com/recaptcha/*
TAG POS=1 TYPE=INPUT:TEXT ATTR=* CONTENT=zx
WAIT SECONDS=2
TAG POS=4 TYPE=DIV ATTR=TXT:Verify


Use wildcards.... But the prob verify button is disabled.... Dunno how to enable it.
I checked the javascript code. But cannot come up with possible solution

So using * Wildcard works for you? Doesnt work for me

gamingmaster
01-14-2015, 11:10 AM
So using * Wildcard works for you? Doesnt work for me

Yes thats the exact code... Except the url should be H t t p S : / / w w w . g o o g le . c o m / r e c a p t c h a/*

The only thing I cannot figure is the verify button disabled...
I guess should send a key press using javascript. Working on it...

Chillivanilli
01-14-2015, 11:36 AM
Yes thats the exact code... Except the url should be H t t p S : / / w w w . g o o g le . c o m / r e c a p t c h a/*

The only thing I cannot figure is the verify button disabled...
I guess should send a key press using javascript. Working on it...

I know how wildcards work, but i mean the frame name doesnt work with wildcards for me.
The verify button is disabled until you type the captcha text into the textfield.

If this does not work, send a keypress event, you can also do that via imacros with the expert mode.