Parameters
- dllName
Type: System.String
The path to DLL library.
- captcha
Type: Zennolab.CommandCenter.HtmlElement
The captcha for recognition.
- parameters
Type: System.String
The recognition parameters.
Return Value
Type: System.String
The recognition result.
The following code example demonstrates uses of the CaptchaRecognition O:Zennolab.CommandCenter.ZennoPoster.CaptchaRecognition method.
| C# | Copy Code |
|---|---|
public static int Execute(Instance instance) { instance.ClearCookie(); Tab tb = instance.MainTab; if ((tb.IsVoid) || (tb.IsNull)) return -1; if (tb.IsBusy) tb.WaitDownloading(); tb.Navigate("http://lessons.zennolab.com/ru/advanced"); if (tb.IsBusy) tb.WaitDownloading(); HtmlElement he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByTag("form", 0).FindChildByAttribute("img", "fulltag", "img", "text", 0); string res = ZennoPoster.CaptchaRecognition("MonkeyEnter.dll", he.DrawToBitmap(true), ""); he = instance.GetTabByAddress("page").GetDocumentByAddress("0").FindElementByTag("form", 0).FindChildByName("recaptcha_response_field"); he.SetValue(res, true); return 0; } | |
| PHP | Copy Code |
|---|---|
public static function Execute($instance) { $instance->ClearCookie(); $tb = $instance->MainTab; if (($tb->IsVoid) || ($tb->IsNull)) return -1; if ($tb->IsBusy) $tb->WaitDownloading(); $tb->Navigate("http://lessons.zennolab.com/ru/advanced"); if ($tb->IsBusy) $tb->WaitDownloading(); $he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByAttribute("img", "fulltag", "img", "text", 0); $res = ZennoPoster::CaptchaRecognition("MonkeyEnter.dll", $he->DrawToBitmap(true), ""); $he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByName("recaptcha_response_field"); $he->SetValue($res, true); return 0; } | |
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family