- Регистрация
- 29.08.2011
- Сообщения
- 9
- Благодарностей
- 0
- Баллы
- 1
Usually in PM you have your project being exeuted from step to step but in CC template everything run through at the same time so much so that that you have less than a second to enter captcha, missed that and your projet will be practically dead, is there a throttling mechanism that make sure each code must be executed in step before going to the next line, (eg WaitDownloading() that way when a captcha is summited, the thread should wait for a reply to come back before moving to the next code which is entering th captcha, and should enter the capcher before moving ahead
note that everything work fine, step by step when you deburg in CC but when runing the project in zennoposter the whole thing becomes a big mess, cause code execuction is faster than light
i have tried // pause Thread.Sleep(); to no avail
below is a simple php code with capcher try running this in zenoposter, if you wait for as much as 15 second which is less than the time for your captcha to get recongnise and sent back by any of the captcha recongnition site you project will conclude telling you that it was a sucesful task when actualy it was a wreck
note that everything work fine, step by step when you deburg in CC but when runing the project in zennoposter the whole thing becomes a big mess, cause code execuction is faster than light
i have tried // pause Thread.Sleep(); to no avail
below is a simple php code with capcher try running this in zenoposter, if you wait for as much as 15 second which is less than the time for your captcha to get recongnise and sent back by any of the captcha recongnition site you project will conclude telling you that it was a sucesful task when actualy it was a wreck
PHP:
<?php
import namespace System;
import namespace Zennolab:::CommandCenter;
class Step1
{
public static function Execute($instance)
{
// Clearing cookies
$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, "");
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByName("recaptcha_response_field");
$he->SetValue($res, true);
// Setting value [jane] to the element with tag [input:text]
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByName("fname");
if ($he->IsVoid) {
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildById("fname");
}
if ($he->IsVoid) {
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByAttribute("input:text", "fulltag", "input:text", "text", 0);
}
if ($he->IsVoid) return -1;
$he->SetValue("jane", true);
// Setting value [ali] to the element with tag [input:text]
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByName("lname");
if ($he->IsVoid) {
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildById("lname");
}
if ($he->IsVoid) {
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByAttribute("input:text", "fulltag", "input:text", "text", 1);
}
if ($he->IsVoid) return -1;
$he->SetValue("ali", true);
// Setting value [[email protected]...] to the element with tag [input:text]
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByName("email");
if ($he->IsVoid) {
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildById("email");
}
if ($he->IsVoid) {
$he = $instance->GetTabByAddress("page")->GetDocumentByAddress("0")->FindElementByTag("form", 0)->FindChildByAttribute("input:text", "fulltag", "input:text", "text", 2);
}
if ($he->IsVoid) return -1;
$he->SetValue("[email protected]", true);
return 0;
}
}
?>