Example for reCAPTCHA 2 solving in iMacros application with built-in Internet Explorer browser

How to solve a reCAPTCHA 2 without installing an AntiCaptcha plugin by including an external JS file in a iMacros application.

For now URL GOTO=javascript: may not work in some browsers. So this code won't work too. Try to use Firefox or iMacros software instead.

For users, who use a standalone iMacros application we created a JS file that contains a functionality for solving a Recaptcha in any browser, including IE which one is used by iMacros software.

There is only Google reCAPTCHA 2.0 and hCaptcha solving implemented. We can't say exactly if a same file for regular image captchas will be done, if so it may have limited functionality.

If you use an iMacros extension for Chrome or Firefox-like browsers instead we recommend you to install our AntiCaptcha extension for browsers and learn about its capabilities for solving reCAPTCHA 2, Funcaptcha, Geetest, hCaptcha and regular image captchas. Our extension works perfectly with iMacros extension allowing you to solve any captcha by using this specialized tool.

The iMacros example is presented below, it opens page with recaptcha and solves it. A YOUR-ANTI-CAPTCHA-API-KEY need to replaced by your Anti-Captcha.com account key.

In the line number 6 Anti-Captcha.com API key is set.
In the line 9 — your API key is fetched into a TEXTAREA element, which is always presented on page with reCAPTCHA.

If this way of setting the API key doesn't work properly you may uncomment the line 11, the API key there is set into a special DIV element. Such method is less laconic, but is more reliable.
Both ways of setting key are supported.

The line 14 includes the JS file with recaptcha solving functional. It's always recommended to include this file from cdn.antcpt.com, only this way it will have all the latest features and fixes.

VERSION BUILD=844 RECORDER=CR ' URL GOTO=https://antcpt.com/rus/demo-form/recaptcha-2.html ' ' Insert your Anti-Captcha API key here SET antiCaptchaApiKey YOUR-ANTI-CAPTCHA-API-KEY ' ' Fetch Anti-Captcha API key in TEXTAREA.g-recaptcha-response element TAG POS=1 TYPE=TEXTAREA ATTR=CLASS:g-recaptcha-response CONTENT={{antiCaptchaApiKey}} ' Or you can place the API key in DIV#anticaptcha-imacros-account-key, it will also work 'URL GOTO=javascript:(function(){var<SP>d=document.getElementById("anticaptcha-imacros-account-key");d||(d=document.createElement("div"),d.innerHTML="{{antiCaptchaApiKey}}",d.style.display="none",d.id="anticaptcha-imacros-account-key",document.body.appendChild(d))})(); ' ' Include recaptcha.js file with all the functional URL GOTO=javascript:(function(){var<SP>s=document.createElement("script");s.src="https://cdn.antcpt.com/imacros_inclusion/recaptcha.js?"+Math.random();document.body.appendChild(s);})(); ' ' Further goes the same code as if you use AntiCaptcha extension ' ' Fill the text field with test value TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:recaptcha_demo_form ATTR=NAME:demo_text CONTENT=iMacros<SP>test<SP>message ' ' Most important part: we wait 120 seconds until an AntiCatcha indicator ' with class "antigate_solver" gets in additional "solved" class SET !TIMEOUT_STEP 120 TAG POS=1 TYPE=DIV ATTR=CLASS:"*antigate_solver*solved*" ' ' Send form TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:recaptcha_demo_form ATTR=TYPE:submit

On certain websites it's forbidden to include any external JS file because of a Content-Security-Policy header and our recaptcha.js won't be embedded as well.
In such cases a whole code of a JS recaptcha solving file can be placed by one line directly into your iMacros script.
The line 14 should be replaced with a content of a quite large single-line file that you can get from the following link: https://cdn.antcpt.com/imacros_inclusion/recaptcha.js.imm .

In case of any problem with AntiCaptcha plugin integration with iMacros you can write us using Feedback form!