Udokanec писал(а): А нельзя организовать перебор в несколько потоков Можно, но довольно сложно получается. Упрощать мне уже перехотелось, упрощайте сами, если устроит Add(MainForm,10860321,98,252) { Width=1104 Height=496 Position=1 } Add(Button,12643928,98,203) { Left=30 Top=40 Font=[MS Sans Serif,10,1,0,1] Caption="Пуск" link(onClick,177524:doDownload,[]) } Add(Edit,516132,161,147) { Left=30 Top=10 Width=355 Text="http://www.flibusta.net/g/sf_history" } Add(HTTP_Get,177524,161,203) { link(onDownload,3018878:doConvert,[]) link(URL,516132:Text,[]) } Add(Convertor,3018878,210,210) { Mode=11 link(onResult,6530865:doSearch,[]) } Add(StrList,1172757,532,210) { FileName="file.txt" Strings=#0:|0:|0:| } Add(BlockFind,6530865,259,210) { IncludeBlock=1 StartBlock="/b/" EndBlock=">" link(onSearch,4646214:doStrCat,[]) link(onEndSearch,5430882:doEvent1,[(300,223)(300,258)]) } Add(StrCat,4646214,308,210) { Str1="http://www.flibusta.net/b/" link(onStrCat,1172757:doAdd,[]) } Add(Application,1368538,1379,490) { Wait=1 } Add(Label,14074347,1379,399) { Left=270 Top=50 Width=110 Caption="" AutoSize=1 Alignment=1 link(Text,12230286:Count,[]) } Add(StringTable,12230286,1379,224) { Left=15 Top=75 Width=1055 Height=373 Name="tab" Columns=#18:Название книги=260|9:Автор=180|9:Размер=70|10:Ссылка=250|10:Ccskrf=250| StrDelimiter="+" Grid=0 Point(doEnsureVisible) Point(EndIdx) Point(PerPage) } Add(DoData,715744,1393,357) { link(onEventData,12230286:doEnsureVisible,[(1437,363)(1437,345)(1367,345)(1367,265)]) link(Data,12230286:EndIdx,[]) } Add(Hub,11697552,1309,406) { OutCount=4 link(onEvent1,715744:doData,[(1360,412)(1360,363)]) link(onEvent2,14074347:doText,[(1368,419)(1368,405)]) link(onEvent3,6404535:doEndUpdate,[(1348,426)(1348,468)]) link(onEvent4,1368538:doProcessMessages,[(1341,433)(1341,496)]) } Add(Button,2144069,581,252) { Left=120 Top=40 Font=[MS Sans Serif,10,1,0,1] Caption="Стоп" Data=Integer(10000000) link(onClick,8504764:doWork1,[(634,258)]) } Add(ArrayRW,8298997,889,364) { link(onRead,5275191:##add,[]) link(Array,1172757:Array,[(895,341)(552,341)]) } Add(Hub,5430882,315,252) { OutCount=3 link(onEvent1,9277452:doOn,[]) link(onEvent2,2721395:doReset,[(340,265)(340,622)]) link(onEvent3,15718944:doOperation,[(389,272)(389,370)]) } Add(If_else,13981546,644,364) { Type=1 link(onTrue,13766748:doFor,[]) link(onFalse,14933269:doEvent1,[(690,377)(690,503)(396,503)(396,447)]) link(Op2,14632370:Var3,[(657,355)(685,355)(685,411)]) } Add(Math,4431190,588,364) { ResultType=0 Default=-20 link(onResult,8504764:doWork2,[]) link(Op1,9752697:Var1,[(594,355)(580,355)(580,404)]) link(Op2,14091636:Var2,[]) } Add(LED,9277452,413,238) { Left=395 Top=7 } Add(MultiElementEx,5275191,980,364) { Mode=1 } BEGIN_SDK Add(EditMultiEx,6858109,21,21) { WorkCount=#5:##add|8:##select|7:##clear| VarCount=#4:Busy|6:Result|7:##count| Width=566 Height=277 Point(##add) Point(##select) Point(##clear) Point(##count) link(##add,11904734:doDownload,[(67,27)(67,181)]) link(Busy,7848559:Value,[(27,264)(202,264)]) link(Result,6552645:Result,[(34,271)(524,271)]) } Add(Convertor,9563503,147,182) { Mode=11 link(onResult,5086714:doSearch,[]) } Add(Hub,11823975,315,182) { OutCount=5 link(onEvent1,11978378:doSearch,[(336,188)(336,41)]) link(onEvent2,4547374:doSearch,[(340,195)(340,90)]) link(onEvent3,12215310:doSearch,[(347,202)(347,132)]) link(onEvent4,15702063:doSearch,[(356,209)(356,181)]) link(onEvent5,11165806:doSearch,[(342,216)(342,230)]) } Add(Charset,199351,252,182) { Type=7 link(onCharset,11823975:doEvent1,[]) } Add(BlockFind,11978378,364,35) { IncludeBlock=1 StartBlock="<h1 class="title">" EndBlock=" (fb2)</h1>" link(onSearch,3476079:doValue,[]) } Add(BlockFind,5086714,196,182) { StartBlock="<div class="content">" EndBlock="<p><br><BR><br><hr/><form name=" link(onSearch,199351:doCharset,[]) link(onEndSearch,11904734:doStop,[(235,195)(235,167)(74,167)(74,188)]) } Add(StrCatDelim,2097359,518,84) { Delimiter="+" link(Str1,3476079:Value,[]) } Add(BlockFind,4547374,364,84) { StartBlock="<a href=/a/" EndBlock="</a>" link(onSearch,786975:doSearch,[]) } Add(BlockFind,12215310,364,126) { IncludeBlock=1 StartBlock="size>" EndBlock="</span>" link(onSearch,10215808:doStrCatDlm,[]) } Add(StrCatDelim,10215808,518,126) { Delimiter="+" link(Str1,2097359:Result,[]) } Add(BlockFind,786975,420,84) { IncludeBlock=1 StartBlock=">" EndBlock="</a>" link(onSearch,2097359:doStrCatDlm,[]) } Add(BlockFind,15702063,364,175) { IncludeBlock=1 StartBlock="скачать: <a href=" EndBlock=">(fb2)" link(onSearch,4970300:doStrCatDlm,[]) } Add(StrCatDelim,12981569,518,175) { Delimiter="+" link(Str1,10215808:Result,[]) } Add(BlockFind,11165806,364,224) { StartBlock="<a href=/b/" EndBlock="read" link(onSearch,9726324:doDelete,[]) } Add(Delete,9726324,413,224) { Count=8 link(onDelete,3977185:doStrCatDlm,[]) } Add(StrCatDelim,6552645,518,224) { Delimiter="+" link(Str1,12981569:Result,[]) } Add(HTTP_Get,11904734,84,175) { link(onDownload,9563503:doConvert,[]) link(onStop,16376638:doData,[(137,202)(137,230)]) } Add(Memory,3476079,518,35) { } Add(StrCatDelim,4970300,413,175) { Str1="==http://www.flibusta.net" Str2=".gg" Point(Delimiter) link(onStrCatDlm,12981569:doStrCatDlm,[]) } Add(StrCatDelim,3977185,469,224) { Str1="=http://www.flibusta.net" link(onStrCatDlm,6552645:doStrCatDlm,[]) } Add(Memory,7848559,196,224) { Default=Integer(1) } Add(DoData,16376638,147,224) { Data=Integer(0) link(onEventData,7848559:doValue,[]) } END_SDK Add(Math,15822941,448,364) { OpType=7 ResultType=0 link(onResult,8889846:doOperation,[]) link(Op1,15600709:Var2,[]) link(Op2,14403516:Var2,[]) } Add(Math,15718944,399,364) { OpType=8 ResultType=0 link(onResult,15822941:doOperation,[]) link(Op1,15600709:Var1,[(405,281)]) link(Op2,14403516:Var1,[(412,320)]) } Add(For,13766748,714,364) { IncludeEnd=1 link(onEvent,13911075:doOperation,[]) link(onStop,15608471:doWork1,[(753,377)]) link(End,14091636:Var3,[(727,320)]) } Add(Math,8889846,497,364) { OpType=2 ResultType=0 link(onResult,8571414:doWork2,[]) link(Op2,1777858:Var2,[]) } Add(GetDataEx,9752697,588,399) { link(Data,4431190:Result,[]) } Add(Math,13911075,777,364) { ResultType=0 link(onResult,5404733:doWork2,[]) link(Op1,9752697:Var3,[(783,348)(629,348)(629,404)]) link(Op2,13766748:Position,[(790,355)(818,355)(818,404)(720,404)]) } Add(Timer,4871956,784,455) { Interval=50 Enable=1 link(onTimer,6739906:doEvent1,[]) } Add(For,45353,868,462) { IncludeEnd=1 link(onEvent,15096239:doEvent1,[]) link(onStop,12145343:doCompare,[(909,475)(909,531)]) link(End,6747223:Var1,[(881,404)]) } Add(Math,13996839,973,469) { Op2=1 ResultType=0 Point(doClear) link(Op1,4188931:Var1,[(979,460)(965,460)(965,509)]) link(Op2,5275191:Busy,[]) } Add(GetDataEx,4188931,973,504) { link(Data,13996839:Result,[]) } Add(Hub,6739906,833,455) { link(onEvent1,13996839:doClear,[(858,461)(858,454)(956,454)(956,482)]) link(onEvent2,45353:doFor,[]) } Add(If_else,12145343,973,525) { Op2=Integer(0) link(onTrue,1790050:doEvent1,[]) link(Op1,4188931:Var2,[]) } Add(For,1078893,1064,539) { IncludeEnd=1 link(onEvent,3428513:doEvent1,[]) link(onStop,4470155:doEvent1,[(1110,552)(1110,566)]) link(End,6747223:Var3,[(1077,404)]) } Add(HubEx,9707336,942,413) { Angle=3 link(onEvent,5275191:##select,[(946,377)]) } Add(Hub,3428513,1162,539) { link(onEvent1,9707336:doWork1,[(1187,545)(1187,419)]) link(onEvent2,5836995:doData,[]) } Add(DoData,5836995,1211,546) { link(onEventData,13853218:doCase,[(1250,552)(1250,230)]) link(Data,5275191:Result,[(1217,411)(993,411)]) } Add(Hub,1790050,1022,525) { OutCount=3 link(onEvent1,4871956:doStop,[(1047,531)(1047,566)(774,566)(774,468)]) link(onEvent2,6404535:doBeginUpdate,[(1054,538)(1054,594)(1355,594)(1355,461)]) link(onEvent3,1078893:doFor,[]) } Add(Hub,15096239,917,462) { link(onEvent1,9707336:doWork3,[(946,468)]) link(onEvent2,13996839:doOperation,[]) } Add(Hub,4470155,1120,560) { OutCount=3 link(onEvent1,5275191:##clear,[(1145,566)(1145,454)(970,454)(970,384)]) link(onEvent2,15885229:doEvent,[(1145,573)(1145,664)]) link(onEvent3,11697552:doEvent1,[(1257,580)(1257,412)]) } Add(HubEx,8571414,560,364) { link(onEvent,4431190:doOperation,[]) } Add(Case,13853218,1288,224) { Value=String() link(onNextCase,12230286:doAdd,[]) } Add(RedrawManager,6404535,1379,448) { ControlManager="tab" Point(doBeginUpdate) Point(doEndUpdate) } Add(GetDataEx,6747223,994,399) { link(Data,5275191:##count,[]) } Add(For,7682409,497,448) { IncludeEnd=1 InData=0 link(onEvent,5404733:doWork3,[(760,454)(760,447)(837,447)]) link(onStop,15608471:doWork2,[]) link(Start,14632370:Var2,[]) } Add(GetDataEx,14632370,497,406) { link(Data,8889846:Result,[]) } Add(GetDataEx,15600709,448,276) { Angle=1 link(Data,1172757:Count,[(545,281)]) } Add(Math,7988423,448,448) { ResultType=0 link(onResult,7682409:doFor,[]) link(Op1,15718944:Result,[(454,432)(405,432)]) link(Op2,14632370:Var1,[(461,411)]) } Add(HubEx,5404733,833,364) { link(onEvent,8298997:doRead,[]) } Add(IndexToChanel,15885229,1176,658) { Point(Index) link(onEvent1,8571414:doWork3,[(1215,664)(1215,601)(564,601)]) link(Index,2721395:State,[]) } Add(Switch,2721395,1176,609) { DataOn=Integer(1) DataOff=Integer(0) Point(State) Point(doOn) } Add(Hub,14933269,406,441) { link(onEvent1,2721395:doOn,[(431,447)(431,629)]) link(onEvent2,7988423:doOperation,[]) } Add(HubEx,15608471,749,455) { link(onEvent,4871956:doTimer,[]) } Add(GetDataEx,14091636,595,315) { link(Data,12230286:PerPage,[(601,306)(1406,306)]) } Add(GetDataEx,1777858,504,315) { Angle=1 link(Data,14091636:Var1,[]) } Add(GetDataEx,14403516,455,315) { Angle=1 link(Data,1777858:Var1,[]) } Add(HubEx,8504764,630,364) { link(onEvent,13981546:doCompare,[]) }
|