IF condition script

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
fabiodurgante
Posts: 22
Joined: Sun Jan 07, 2018 5:02 pm

IF condition script

Post by fabiodurgante » Thu Apr 12, 2018 11:23 am

hello i want to do IF in imacros has site speedup faucet that has random captcha, how could i do if page has captcha solve media ,,,,,,
if you have recaptcha ......

how to make condition in imacros ????
fabiodurgante
Posts: 22
Joined: Sun Jan 07, 2018 5:02 pm

Re: IF condition script

Post by fabiodurgante » Tue Apr 17, 2018 7:06 pm

i try and i get work for me

Code: Select all


var solvemedia;
var recpatcha;

solvemedia="CODE:";
solvemedia+="TAG POS=1 TYPE=IMG ATTR=ID:adcopy-puzzle-image-image-captchaShortlink";

recpatcha="CODE:";
recpatcha+="TAG POS=1 TYPE=TEXTAREA ATTR=ID:g-recaptcha-response";

var captcha_solve_media=null;
var captcha_recpatcha=null;

captcha_solve_media=iimPlay(solvemedia);
captcha_recpatcha=iimPlay(recpatcha);

if(captcha_solve_media>0){
alert ("achou captcha solve media")
iimPlay("CODE: URL GOTO=imacros://run/?m=speedup-faucet-solve-media.iim")
}

if(captcha_recpatcha>0){
alert ("achou captcha RECAPTCHA")
}

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

Re: IF condition script

Post by chivracq » Wed Apr 18, 2018 10:59 pm

fabiodurgante wrote:hello i want to do IF in imacros has site speedup faucet that has random captcha, how could i do if page has captcha solve media ,,,,,,
if you have recaptcha ......

how to make condition in imacros ????
CIM...! :mrgreen:
(But I think I've already asked several times..., useless to mention again I guess...)
fabiodurgante wrote:i try and i get work for me

Code: Select all


var solvemedia;
var recpatcha;

solvemedia="CODE:";
solvemedia+="TAG POS=1 TYPE=IMG ATTR=ID:adcopy-puzzle-image-image-captchaShortlink";

recpatcha="CODE:";
recpatcha+="TAG POS=1 TYPE=TEXTAREA ATTR=ID:g-recaptcha-response";

var captcha_solve_media=null;
var captcha_recpatcha=null;

captcha_solve_media=iimPlay(solvemedia);
captcha_recpatcha=iimPlay(recpatcha);

if(captcha_solve_media>0){
alert ("achou captcha solve media")
iimPlay("CODE: URL GOTO=imacros://run/?m=speedup-faucet-solve-media.iim")
}

if(captcha_recpatcha>0){
alert ("achou captcha RECAPTCHA")
}

Very-very good, first time you share a Solution, I'm "impressed"... :D
(Being a little bit "sarcastic" (from your "History" on the Forum), but still nice of you to share...)
- (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