p71.mp108.aaanet.ru писал(а): А пока я начну сам изучать hiasm и попробую сделать.
Пока свое клацал, походу и Вам "рыбу" подготовил. Переделывать схему из етого топика не было времени, так что набросал по новой.
Правда проверять уже некогда, тестировать и наводить порядок в схеме предстоит вам
Add(MainForm,2953706,35,35) { Width=800 Height=259 Caption="USB" Position=1 link(onCreate,4794236:doEvent1,[(79,55)(79,216)]) } Add(FSMonitor,5464525,112,105) { link(onDeviceArrival,15091838:doStrCat,[]) } Add(PointHint,11773076,175,7) { Info=#9:Настройка| Font=[MS Sans Serif,8,0,16711680,1] Transparent=0 VAlign=0 Width=99 Height=67 } Add(PointHint,11327229,175,77) { Info=#33:Идентификация сьемных накопителей| Font=[MS Sans Serif,8,0,16711680,1] Transparent=0 VAlign=0 Width=232 Height=165 } Add(PointHint,10079214,434,105) { Info=#39:Проверка и запись в список игнорируемых| Font=[MS Sans Serif,8,0,16711680,1] Transparent=0 VAlign=0 Width=232 Height=123 } Add(ChildFormEx,16003409,210,35) { } BEGIN_SDK Add(EditMultiEx,10334496,14,21) { WorkCount=#9:doVisible| Width=622 Height=319 link(doVisible,10754176:doVisible,[(56,27)(56,97)]) } Add(MainForm,10754176,70,63) { Left=35 Top=105 Visible=1 Position=1 Point(doVisible) link(onCreate,4801426:doEvent1,[]) } Add(CheckBox,4734215,231,77) { Left=10 Top=10 Width=320 Caption="Добавить программу в автозагрузку" } Add(CheckBox,2589548,231,147) { Left=10 Top=35 Width=320 Caption="Отключить автозапуск дисков" } Add(Registry,12290043,420,70) { HKey=2 Key="SOFTWAREMicrosoftWindowsCurrentVersionRun" Value="USB" Point(doDeleteValue) } Add(Dir,10180712,329,28) { } Add(FormatStr,3884152,364,77) { Mask=""%1%2"" link(onFString,12290043:doWrite,[]) link(Str1,10180712:CurrentDir,[(370,69)(335,69)]) link(Str2,9410619:Text,[(377,61)(384,61)]) } Add(If_else,3242615,308,77) { Op2=String(1) link(onTrue,3884152:doString,[]) link(onFalse,12290043:doDeleteValue,[(357,90)(357,118)(405,118)(405,90)]) link(Op1,10969825:Var3,[(314,65)]) } Add(Button,729089,63,259) { Left=295 Top=245 Width=90 Caption="Сохранить" link(onClick,28215:doEvent1,[]) } Add(If_else,2931467,308,147) { Op2=Integer(1) link(onTrue,211916:doWrite,[]) link(onFalse,211916:doDeleteValue,[]) link(Op1,8993910:Var3,[(314,135)]) } Add(Ini,6825215,189,77) { FileName="config.ini" Section="config" Key="run" link(onResult,4734215:doCheck,[]) link(Value,10969825:Var1,[(216,65)]) } Add(Hub,28215,105,259) { OutCount=6 link(onEvent1,6825215:doWrite,[(169,265)(169,90)]) link(onEvent2,13394409:doWrite,[(177,272)(177,160)]) link(onEvent3,3242615:doCompare,[(292,279)(292,83)]) link(onEvent4,2931467:doCompare,[(300,286)(300,153)]) link(onEvent5,15050460:doMessage,[]) link(onEvent6,10754176:doClose,[(126,300)(126,316)(30,316)(30,90)]) } Add(GetDataEx,10969825,273,60) { Angle=2 link(Data,4734215:Checked,[(279,115)(237,115)]) } Add(Ini,13394409,189,147) { FileName="config.ini" Section="config" Key="autorun" link(onResult,2589548:doCheck,[]) link(Value,8993910:Var1,[(216,135)]) } Add(Hub,4801426,119,77) { link(onEvent1,6825215:doRead,[]) link(onEvent2,13394409:doRead,[(141,90)(141,153)]) } Add(GetDataEx,8993910,272,130) { Angle=2 link(Data,2589548:Checked,[(278,185)(237,185)]) } Add(Registry,211916,420,140) { HKey=2 Key="SOFTWAREMicrosoftWindowsCurrentVersionpoliciesExplorer" Value="NoDriveTypeAutoRun" DataType=0 Data="255" Point(doDeleteValue) } Add(Message,15050460,420,287) { Message="Изминения вступят в силу после перезагрузки компьютера" Icon=4 } Add(VisualStrings,9410619,378,35) { Lines=#7:USB.exe| Width=53 } END_SDK Add(Button,10907198,112,35) { Left=5 Top=10 Width=130 Caption="Настройки" link(onClick,16003409:doVisible,[]) } Add(DiskInfo,10843886,210,161) { Point(SerialNumber) Point(ID) Point(onErr) Point(DriveType) link(onInfo,4024163:doCompare,[]) link(ID,15091838:Result,[]) link(onErr,1686160:doWork3,[(270,174)]) } Add(Button,15912916,161,490) { Left=5 Top=100 Width=130 Caption="Посмотреть отчет" Data=Integer(0) link(onClick,12337142:doEvent1,[]) } Add(Timer,6465436,287,105) { Enable=1 AutoStop=1 link(onTimer,4410690:doWork1,[(332,111)(332,96)(187,96)]) } Add(If_else,4024163,287,161) { Op2=Integer(2) link(onTrue,4651060:doCompare,[]) link(Op1,10843886:DriveType,[(293,145)(276,145)(276,205)(251,205)]) } Add(HubEx,1686160,266,105) { link(onEvent,6465436:doTimer,[]) } Add(StrCat,15091838,210,105) { Str2=":" link(onStrCat,1686160:doWork2,[]) } Add(Button,16618241,329,567) { @Hint=#18:Сохранение таблицы|7: в файл| Left=5 Top=70 Width=130 Caption="Сохранить таблицу" Point(doEnabled) link(onClick,14304675:doEvent1,[]) } Add(Button,6022033,329,637) { Left=5 Top=40 Width=130 Caption="Подтвердить возврат" Data=Integer(1) Point(doEnabled) link(onClick,8378914:doSplit,[(384,643)(384,692)]) } Add(Time,6494575,686,427) { Time_Date=1 Format="D:M:Y h:m:s" } Add(Button,478565,112,161) { Left=10 Top=195 Caption="проба" link(onClick,4410690:doWork2,[]) } Add(HubEx,4410690,183,161) { link(onEvent,10843886:doInfo,[]) } Add(If_else,4651060,336,161) { link(onFalse,3675112:doEvent1,[]) link(Op1,9240267:Var2,[]) } Add(GetDataEx,9240267,336,136) { Angle=3 link(Data,10843886:SerialNumber,[(328,141)(328,219)(244,219)]) } Add(StringTableMT,1676018,609,532) { Left=140 Top=10 Width=640 Height=210 Columns=#7:Диск=80|10:Ф.И.О.=250|8:Взял=150|9:Отдал=150| Redaction=0 TabGrid=0 TabGridFrame=0 TableWBreak=0 IconsCheck=[] MiscIcons=[] Icons=[] FileName="used.txt" StaticColumn=0 Point(doEndEdit) Point(doMT_FindText) Point(doMT_Replace) Point(Index) Point(FileName) link(FileName,1821554:Value,[]) } Add(FormatStr,15464654,504,441) { Mask="%1;Введите пользователя;%2;-;" Point(FString) link(onFString,1676018:doAdd,[(576,447)(576,538)]) link(Str1,6512579:Item,[]) link(Str2,9259420:Var1,[(517,425)(674,425)(674,481)]) } Add(Hub,14304675,434,567) { InCount=3 OutCount=3 link(onEvent1,1676018:doEndEdit,[]) link(onEvent2,1676018:doSave,[(549,580)(549,566)]) link(onEvent3,6928923:doEnum,[(460,587)(460,735)(131,735)(131,286)]) } Add(MultiStrPart,8378914,616,686) { Count=4 link(onSplit,8911572:doAdd,[(666,692)(666,783)(585,783)(585,748)]) link(Str,1676018:Select,[]) } Add(MT_AddData,8911572,609,742) { Count=5 link(onAdd,1676018:doMT_Replace,[(710,748)(710,624)(597,624)(597,587)]) link(Data1,1676018:Index,[(615,733)(604,733)(604,649)(629,649)]) link(Data2,8378914:Part1,[]) link(Data3,8378914:Part2,[]) link(Data4,8378914:Part3,[]) link(Data5,9259420:Var2,[(643,732)(692,732)]) } Add(PointHint,7147246,539,665) { Info=#23:установка даты возврата| Font=[MS Sans Serif,8,0,16711680,1] Transparent=0 VAlign=0 Width=183 Height=123 } Add(PointHint,6334710,434,238) { Info=#40:Проверка списка используемых накопителей| Font=[MS Sans Serif,8,0,16711680,1] Transparent=0 VAlign=0 Width=232 Height=158 } Add(LineBreak,14427753,182,581) { Caption="doLoad" PColor(Out,16776960) link(Out,6197367:doWork3,[(291,587)]) Primary=[5864675,7,-364] } Add(LineBreak,11479157,455,441) { Caption="new" link(Out,15464654:doString,[]) Primary=[1729495,112,-273] } Add(LineBreak,6520005,511,637) { Caption="FindText" link(Out,1676018:doMT_FindText,[(588,643)(588,580)]) Primary=[13404685,42,-336] } Add(LineBreak,10871990,455,301) { Caption="Used" link(Out,6512579:doEvent1,[]) Primary=[10856529,112,-112] } Add(Hub,12337142,238,490) { OutCount=4 PColor(onEvent1,11141120) PColor(onEvent2,16711935) link(onEvent1,14304675:doEvent3,[(426,496)(426,587)]) link(onEvent2,517953:doWork1,[(406,503)]) link(onEvent3,13257696:doExecute,[]) link(onEvent4,9264084:doEvent1,[(279,517)(279,601)]) } Add(Memory,1821554,616,476) { Default=String(used.txt) PColor(onData,16776960) link(onData,311579:doWork1,[(656,482)(656,520)(550,520)]) } Add(ODialog,13257696,343,504) { FileName="report" link(onExecute,1821554:doValue,[(398,510)(398,482)]) } Add(HubEx,311579,546,553) { PColor(onEvent,16776960) link(onEvent,1676018:doLoad,[]) } Add(Button,3742373,161,539) { Left=5 Top=130 Width=130 Caption="Обновить табицу" Data=Integer(1) link(onClick,3967727:doEvent1,[]) } Add(HubEx,517953,402,539) { PColor(onEvent,16711935) link(onEvent,1676018:doClear,[]) } Add(Hub,3967727,238,539) { OutCount=4 PColor(onEvent1,16711935) PColor(onEvent2,16711680) PColor(onEvent3,16776960) link(onEvent1,517953:doWork2,[]) link(onEvent2,1821554:doClear,[(416,552)(416,489)]) link(onEvent3,6197367:doWork2,[]) link(onEvent4,9264084:doEvent2,[(270,566)(270,608)]) } Add(HubEx,6197367,287,553) { PColor(onEvent,16776960) link(onEvent,311579:doWork2,[]) } Add(Hub,9264084,287,595) { InCount=2 link(onEvent1,16618241:doEnabled,[(315,601)(315,573)]) link(onEvent2,6022033:doEnabled,[(315,608)(315,643)]) } Add(Hub,4794236,91,210) { OutCount=3 link(onEvent2,5864675:In,[]) link(onEvent3,6928923:doLoad,[(137,230)(137,279)]) } Add(MultiElementEx,6928923,182,273) { } BEGIN_SDK Add(EditMultiEx,8882358,21,21) { WorkCount=#6:doLoad|6:doEnum| Width=475 Height=256 link(doLoad,14046:doEvent1,[]) link(doEnum,8071491:doEvent1,[(35,34)(35,146)]) } Add(DoData,14496712,350,147) { link(onEventData,14490137:doEvent1,[]) link(Data,7490054:Item,[(356,124)(176,124)(176,191)(202,191)]) } Add(StrList,5108142,182,56) { FileName="used.txt" } Add(StrList,13011650,455,84) { FileName="report.txt" } Add(ArrayEnum,7490054,196,147) { Type=1 link(onItem,12934161:doSplit,[]) link(onEndEnum,5907109:doEvent1,[(236,160)(236,195)]) link(Array,5108142:Array,[]) } Add(If_else,8019922,301,147) { Op2=String(-) link(onFalse,14496712:doData,[(341,160)(341,153)]) } Add(MultiStrData,12934161,252,147) { Count=4 link(onPart4,8019922:doCompare,[(289,174)(289,153)]) } Add(DoData,15213981,91,70) { link(onEventData,5108142:doDelete,[]) link(Data,7490054:Index,[(97,56)(41,56)(41,200)(209,200)]) } Add(Hub,14490137,392,147) { link(onEvent1,13011650:doAdd,[(415,153)(415,90)]) link(onEvent2,15213981:doData,[(415,160)(415,252)(79,252)(79,76)]) } Add(Hub,5907109,259,189) { link(onEvent1,13011650:doSave,[(425,195)(425,125)]) link(onEvent2,5108142:doSave,[(285,202)(285,224)(152,224)(152,97)]) } Add(Hub,14046,119,21) { InCount=2 link(onEvent1,13011650:doLoad,[(238,27)(238,118)]) link(onEvent2,5108142:doLoad,[(153,34)(153,90)]) } Add(Hub,8071491,49,140) { link(onEvent1,14046:doEvent2,[(110,146)(110,34)]) link(onEvent2,7490054:doEnum,[]) } END_SDK Add(MultiElementEx,3675112,504,168) { link(onYES,1729495:In,[]) link(onEndEnum,10856529:In,[(552,181)(552,195)]) link(Data,9240267:Var1,[(510,130)(342,130)]) } BEGIN_SDK Add(EditMultiEx,14621674,21,21) { WorkCount=#8:doEvent1|8:doString| EventCount=#5:onYES|9:onEndEnum| VarCount=#7:FString| DataCount=#4:Data| Width=622 Height=228 link(doEvent1,16521800:doEvent1,[(73,27)(73,160)]) link(doString,1055751:doString,[(199,34)(199,111)]) link(FString,12666080:Var2,[]) } Add(DoData,11690754,476,105) { link(onEventData,12104397:doEvent1,[(526,111)(526,55)(88,55)(88,97)]) link(Data,11012153:Var3,[(482,87)]) } Add(FormatStr,1055751,378,105) { DataCount=1 Mask="Найден сьемный накопитель с SN = %1, не зарегестрирован в программе. Добавить в список игнорируемых?" Point(FString) link(onFString,16498251:doMessage,[]) link(Str1,11012153:Var2,[]) } Add(If_else,6256023,238,161) { link(onTrue,487762:doStop,[(279,167)(279,144)(169,144)(169,174)]) link(Op2,7431521:Var2,[]) } Add(StrList,1946536,182,91) { FileName="ignore.txt" } Add(ArrayEnum,487762,182,161) { onBreakEnable=0 link(onItem,6256023:doCompare,[]) link(onEndEnum,14621674:onEndEnum,[(428,174)(428,34)]) link(Array,1946536:Array,[(188,149)(202,149)]) } Add(Hub,16521800,105,154) { link(onEvent1,1946536:doLoad,[(151,160)(151,125)]) link(onEvent2,487762:doEnum,[]) } Add(Message,16498251,427,105) { Type=2 Point(onYES) Point(onNO) link(onYES,11690754:doData,[(467,118)(467,111)]) link(onNO,11171421:doMessage,[(467,125)(467,167)]) } Add(Message,11171421,476,161) { Message="Зарегестрировать в программе для дальнейшего использования?" Type=2 Point(onYES) Point(onNO) link(onYES,14621674:onYES,[(576,174)(576,27)]) } Add(Hub,12104397,105,91) { OutCount=3 link(onEvent1,1946536:doAdd,[]) link(onEvent2,1946536:doSave,[(131,104)(131,132)]) link(onEvent3,1946536:doClear,[(151,111)(151,104)]) } Add(GetDataEx,7431521,245,82) { Angle=3 link(Data,12666080:Var3,[]) } Add(GetDataEx,11012153,378,82) { Angle=3 link(Data,7431521:Var3,[(381,87)]) } Add(GetDataEx,12666080,21,82) { link(Data,14621674:Data,[]) } END_SDK Add(MultiElementEx,6512579,504,301) { link(onAdd,13404685:In,[]) link(onEndEnum,3675112:doString,[(548,314)(548,345)(444,345)(444,181)]) link(Op2,3675112:FString,[]) } BEGIN_SDK Add(EditMultiEx,6976945,21,21) { WorkCount=#8:doEvent1| EventCount=#5:onAdd|9:onEndEnum| VarCount=#4:Item| DataCount=#3:Op2| Width=531 link(doEvent1,8143663:doEvent1,[(56,27)(56,132)]) link(Item,5402385:Var2,[]) } Add(StrList,14893167,133,70) { FileName="used.txt" } Add(ArrayEnum,2036459,133,133) { onBreakEnable=0 link(onItem,8895542:doSplit,[]) link(onEndEnum,6976945:onEndEnum,[(359,146)(359,34)]) link(Array,14893167:Array,[(139,124)(153,124)]) } Add(If_else,12618463,245,133) { link(onTrue,16118371:doEvent1,[]) link(Op2,5402385:Var3,[(258,77)]) } Add(StrPart,8895542,196,133) { Char=";" Point(Left) link(onPart,12618463:doCompare,[(236,146)(236,139)]) } Add(MT_AddData,5980876,350,140) { Count=3 link(onAdd,6976945:onAdd,[(467,146)(467,27)]) link(Data1,8895542:Left,[(356,124)(175,124)(175,174)(202,174)]) link(Data2,16044219:Text,[]) link(Data3,10138646:Text,[(370,128)(384,128)]) } Add(Hub,8143663,91,126) { link(onEvent1,14893167:doLoad,[(119,132)(119,104)]) link(onEvent2,2036459:doEnum,[]) } Add(Hub,16118371,287,133) { OutCount=3 link(onEvent1,2036459:doStop,[(310,139)(310,183)(127,183)(127,146)]) link(onEvent2,5980876:doAdd,[]) link(onEvent3,14893167:doClear,[(319,153)(319,59)(121,59)(121,83)]) } Add(VisualStrings,16044219,357,98) { Lines=#1:0| Width=18 } Add(VisualStrings,10138646,378,98) { Lines=#1:0| Width=18 } Add(GetDataEx,5402385,21,72) { link(Data,6976945:Op2,[]) } END_SDK Add(GetDataEx,9259420,686,476) { link(Data,6494575:FormatTime,[]) } Add(PointHint,4991016,147,252) { Info=#21:Создание файла отчета| Font=[MS Sans Serif,8,0,16711680,1] Transparent=0 VAlign=0 Width=141 Height=95 }
|