Вверх ↑
Ответов: 783
Рейтинг: 168
#1: 2023-06-04 18:21:08 ЛС | профиль | цитата
Udokanec писал(а):
С переводом слава богу разобрались.А вот с сохранением затык

Сохрани эту схему в той папке, где лежит твой переводчик и запусти.
Add(Label,5779113,35,-28)
{
Width=623
Height=40
Align=2
Caption=""
AutoSize=1
}
Add(MainForm,12538489,35,21)
{
Width=639
Height=434
Caption="Переводчик"
link(onCreate,13866874:doSearch,[])
}
Add(Dir,3228816,98,-21)
{
}
Add(FileSearch,9717498,196,35)
{
Ext="*.xml"
TimeType=1
link(onSearch,207868:doCompare,[])
}
Add(StrMask,207868,245,35)
{
Mask="*strings.xml*"
link(onFalse,6015859:doCompare,[])
link(onTrue,14655617:doWork2,[(284,48)(284,76)])
}
Add(StrMask,10753117,343,35)
{
Mask="*plurals.xml*"
link(onTrue,5347163:doWork1,[(389,48)])
}
Add(StrMask,6015859,294,35)
{
Mask="*arrays.xml*"
link(onFalse,10753117:doCompare,[])
link(onTrue,14655617:doWork1,[(333,48)])
}
Add(HubEx,14655617,329,70)
{
link(onEvent,5347163:doWork2,[])
}
Add(HubEx,5347163,385,70)
{
link(onEvent,9706946:doPart,[])
}
Add(FormatStr,14538516,623,350)
{
Mask="http://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=ru&dt=t&q=%1"
Point(FString)
link(onFString,11517376:doDownload,[])
}
Add(Charset,3311185,777,357)
{
Type=7
link(onCharset,5812435:doString,[])
}
Add(ArrayEnum,8980152,399,350)
{
link(onItem,2408796:doMultiBlockFind,[])
link(onEndEnum,11688874:doMessage,[(445,363)(445,419)])
link(Array,9209032:Array,[])
}
Add(HTTP_Get,11517376,672,350)
{
Wait=0
link(onDownload,3566074:doConvert,[])
link(URL,14538516:FString,[(678,341)(664,341)(664,390)(629,390)])
}
Add(StreamConvertor,3566074,728,357)
{
Mode=6
link(onResult,3311185:doCharset,[])
}
Add(Application,4166785,539,189)
{
}
Add(VBJScript,8125465,875,357)
{
WorkPoints=#11:##SetScript|0:|
EventPoints=#7:onEvent|0:|
Language=1
Script=#0:|0:|
UseName=0
link(onEvent,5821437:doReplace,[])
}
Add(FormatStr,5812435,826,357)
{
DataCount=1
Mask="var a = %1;\r\nsys.onEvent(a[0][0][0]);\r\n"
link(onFString,8125465:##SetScript,[])
}
Add(Replace,14374881,980,357)
{
SubStr="%20"
DestStr=" "
Point(Skip)
Point(CurentStr)
link(onReplace,5585862:doData,[(1023,363)(1023,477)(396,477)(396,440)])
}
Add(FileSearch,13866874,91,35)
{
Ext="values"
Include=1
link(onSearch,15580722:doValue,[])
link(Dir,3228816:CurrentDir,[])
}
Add(FilePartElm,9706946,406,70)
{
link(onPart,4074552:doAdd,[(451,76)(451,138)(228,138)(228,237)])
}
Add(Memory,15580722,140,35)
{
link(onData,9717498:doSearch,[])
}
Add(ComboBox,4074552,238,231)
{
Left=20
Top=10
Width=160
Height=21
Text="Выбрать файл для перевода"
DataType=1
link(onClick,861772:doString,[])
}
Add(Memo,6893884,490,189)
{
Top=40
Width=508
Height=355
Align=5
Font=[MS Sans Serif,10,0,0,1]
ScrollBars=3
Point(doSave)
link(onChange,4166785:doProcessMessages,[])
}
Add(FormatStr,861772,287,238)
{
Mask="%1/%2"
link(onFString,9209032:doLoad,[])
link(Str1,12594517:Var3,[(293,208)])
}
Add(MultiBlockFind,2408796,455,350)
{
Count=3
TagList="{**s} <item> {**x} </item> {**e}\r\n{**s} "> {**x} </string> {**e}\r\n{**s} "> {**x} </item> {**e}"
link(onResult1,10664408:doWork2,[])
link(onResult2,4276026:doWork2,[])
link(onResult3,4276026:doWork3,[(508,370)])
}
Add(HubEx,10664408,504,350)
{
link(onEvent,3697320:doCompare,[])
}
Add(HubEx,4276026,504,357)
{
Angle=3
link(onEvent,10664408:doWork3,[])
}
Add(StrMask,3697320,525,350)
{
link(onFalse,599650:doValue,[])
}
Add(Memory,599650,574,350)
{
link(onData,14538516:doString,[])
}
Add(Replace,5821437,931,357)
{
link(onReplace,14374881:doReplace,[])
link(Str,8980152:Item,[(937,340)(924,340)(924,405)(405,405)])
link(Sub_str,599650:Value,[(944,334)(914,334)(914,398)(580,398)])
}
Add(Message,11688874,483,413)
{
Message="Перевод завершён"
}
Add(StrList,9209032,385,210)
{
Point(doLoad)
Point(doReplace)
Point(doSave)
link(onChange,13239508:doData,[])
link(Str,14374881:CurentStr,[(391,180)(972,180)(972,397)(986,397)])
}
Add(DoData,13239508,434,210)
{
link(onEventData,6893884:doText,[])
link(Data,9209032:Text,[(440,201)(426,201)(426,271)(391,271)])
}
Add(Button,3040777,357,350)
{
Left=215
Top=5
Width=115
Height=30
Font=[MS Sans Serif,12,1,0,1]
Caption="Перевести"
link(onClick,8980152:doEnum,[])
}
Add(Button,626637,77,308)
{
Left=350
Top=5
Width=115
Height=30
Font=[MS Sans Serif,12,1,0,1]
Caption="Сохранить"
link(onClick,6451111:doString,[])
}
Add(DoData,5585862,406,434)
{
link(onEventData,9209032:doReplace,[(445,440)(445,426)(375,426)(375,251)])
link(Data,8980152:Index,[])
}
Add(FormatStr,11657250,238,308)
{
Mask="%1-ru\%2"
Point(FString)
link(onFString,6893884:doSave,[(473,314)(473,223)])
link(Str1,1121827:Var3,[(244,292)])
link(Str2,4074552:String,[])
}
Add(Dir,3211155,189,308)
{
Point(Dir)
link(onEnd,11657250:doString,[])
}
Add(FormatStr,6451111,140,308)
{
DataCount=1
Mask="%1-ru"
Point(FString)
link(onFString,3211155:doDir,[])
link(Str1,1121827:Var2,[])
}
Add(GetDataEx,1121827,140,287)
{
link(Data,12594517:Var2,[])
}
Add(GetDataEx,12594517,140,203)
{
link(Data,15580722:Value,[])
}

карма: 15

0
Редактировалось 1 раз(а), последний 2023-06-04 18:31:17