Схему постарался сделать как можно более понятной
Для запуска требуется bass.dll
Схема: (новая версия)
Add(MainForm,2953706,-245,63)
{
Width=394
Height=365
Color=-16777200
Caption="ForVo"
BorderStyle=4
ClientSize=0
Position=1
Point(Handle)
link(onCreate,16662481:doInit,[])
}
Add(Memo,13783086,-231,735)
{
@Hint=#14:Входящий текст|
Left=20
Top=20
Width=345
Height=225
ScrollBars=3
link(onChange,4127873:doEvent1,[])
}
Add(StrList,65463,294,777)
{
@Hint=#15:Отдельные слова|
link(onChange,1596375:doEnum,[(352,783)(352,748)])
}
Add(ArrayEnum,4619051,-217,812)
{
link(onItem,3256997:doReplace,[])
link(Array,13783086:Array,[])
}
Add(Hub,4127873,-147,735)
{
OutCount=3
link(onEvent1,65463:doClear,[(35,741)(35,790)])
link(onEvent2,5566719:doClear,[(161,748)(161,797)])
link(onEvent3,4619051:doEnum,[(-121,755)(-121,787)(-229,787)(-229,818)])
}
Add(Replace,3256997,-154,812)
{
SubStr="."
DestStr=" "
Point(Skip)
link(onReplace,191069:doReplace,[])
}
Add(Replace,191069,-105,812)
{
SubStr=","
DestStr=" "
Point(Skip)
link(onReplace,12672525:doReplace,[])
}
Add(Replace,12672525,-56,812)
{
SubStr="!"
DestStr=" "
Point(Skip)
link(onReplace,6406621:doReplace,[])
}
Add(Replace,6406621,-7,812)
{
SubStr="?"
DestStr=" "
Point(Skip)
link(onReplace,15241925:doReplace,[])
}
Add(Replace,15241925,35,812)
{
SubStr=" "
DestStr="0"
Point(Skip)
link(onReplace,1106675:doReplace,[])
}
Add(Replace,1106675,77,812)
{
SubStr="00"
DestStr="0"
Point(Skip)
link(onReplace,7617744:doReplace,[])
}
Add(Replace,7617744,119,812)
{
SubStr="00"
DestStr="0"
Point(Skip)
link(onReplace,4003424:doReplace,[])
}
Add(Replace,4003424,161,812)
{
SubStr="00"
DestStr="0"
Point(Skip)
link(onReplace,65463:doAdd,[(198,818)(198,783)])
}
Add(Button,13306009,-98,399)
{
Left=200
Top=260
Width=160
Caption="Произнести"
link(onClick,9980545:doEnum,[])
}
Add(ComboBox,5566719,553,784)
{
@Hint=#15:Очищенный текст|
Left=25
Top=260
Width=155
Height=21
Text="Список слов"
ReadOnly=0
DropDownCount=15
link(Str,2837487:Part,[(559,779)(440,779)])
}
Add(ArrayEnum,1596375,378,742)
{
link(onItem,2837487:doEnum,[])
link(Array,65463:Array,[(384,730)(349,730)(349,834)(314,834)])
}
Add(Str_Enum,2837487,427,742)
{
Delimiter="0"
link(onEnum,5566719:doAdd,[(502,748)(502,790)])
}
Add(HTTP_Get,14531360,420,399)
{
Wait=0
link(onDownload,12110164:doConvert,[(474,412)(474,405)])
link(URL,8533672:Value,[(426,387)(394,387)(394,443)(363,443)])
}
Add(FormatStr,93692,308,399)
{
Mask="http://www.forvo.com/search/?word_search=%1&id_lang=%2"
link(onFString,8533672:doValue,[])
link(Str1,11632660:Value,[(314,387)(265,387)(265,443)(216,443)])
link(Str2,11217035:Value,[(321,233)(818,233)])
}
Add(Label,6660242,56,182)
{
Left=29
Top=293
Width=86
Height=17
Transparent=0
Caption="Выберите язык:"
}
Add(ComboBox,4796565,308,63)
{
Left=135
Top=290
Width=120
Height=21
Strings=#14:Автоматический|7:Русский|10:Английский|
Text="Автоматический"
link(onClick,12864979:doValue,[])
}
Add(If_else,14330419,455,70)
{
Op2=Integer(0)
link(onTrue,2530718:doData,[(495,76)(495,27)])
link(onFalse,6149065:doCompare,[])
link(Op1,6644921:Var3,[(461,58)(423,58)(423,114)])
}
Add(Memory,12864979,378,70)
{
link(onData,14330419:doCompare,[])
}
Add(If_else,6149065,528,77)
{
Op2=Integer(1)
link(onTrue,10874031:doData,[(574,83)(574,48)])
link(onFalse,3246366:doCompare,[])
link(Op1,6644921:Var1,[(534,65)(375,65)(375,114)])
}
Add(GetDataEx,6644921,378,109)
{
link(Data,12864979:Value,[])
}
Add(If_else,3246366,603,84)
{
Op2=Integer(2)
link(onTrue,3953387:doData,[(653,90)(653,62)])
link(Op1,6644921:Var2,[(609,72)(511,72)(511,124)(384,124)])
}
Add(DoData,2530718,504,21)
{
Data=String(0)
link(onEventData,8606959:doWork2,[])
}
Add(DoData,10874031,602,42)
{
Data=String(138)
link(onEventData,8606959:doWork3,[(656,48)])
}
Add(DoData,3953387,693,56)
{
Data=String(39)
link(onEventData,8606959:doWork1,[(737,62)(737,27)])
}
Add(Memory,11217035,812,35)
{
Default=String(0)
link(onData,6636598:doText2,[(877,41)(877,48)])
}
Add(HubEx,8606959,652,21)
{
Angle=3
link(onEvent,13431795:doWork2,[(656,41)])
}
Add(Edit,6636598,910,35)
{
Left=310
Top=290
Width=40
Text="0"
link(onChange,13431795:doWork1,[(954,41)(954,32)(781,32)])
}
Add(Label,6752134,126,182)
{
Left=280
Top=293
Width=23
Height=17
Transparent=0
Caption="Код"
}
Add(ArrayEnum,9980545,-20,399)
{
PColor(Array,0)
link(onItem,10148695:doCharset,[])
link(Array,5566719:Array,[(-14,387)(272,387)(272,841)(559,841)])
}
Add(StreamConvertor,12110164,483,399)
{
Mode=6
Symbol="*"
link(onResult,3982735:doEnum,[])
}
Add(BlockFind,6191888,861,399)
{
IncludeBlock=1
StartBlock=",'"
EndBlock="','"
Point(doStop)
link(onSearch,6479325:doEvent1,[])
link(Text,15927936:Var3,[(867,345)])
}
Add(Hub,6479325,938,399)
{
link(onEvent1,6191888:doStop,[(964,405)(964,409)(849,409)(849,412)])
link(onEvent2,12763040:doValue,[(987,412)(987,405)])
}
Add(FormatStr,3862162,1078,399)
{
DataCount=1
Mask="http://www.forvo.com/player-mp3Handler.php?path=%1"
link(onFString,14518012:doValue,[])
link(Str1,12763040:Value,[(1084,387)(1056,387)(1056,443)(1028,443)])
}
Add(Memory,12763040,1022,399)
{
link(onData,3862162:doString,[])
}
Add(Memory,8533672,357,399)
{
link(onData,14531360:doDownload,[])
}
Add(Memory,14518012,1120,399)
{
link(onData,13074198:doCreate,[])
}
Add(StrMask,3590115,693,399)
{
Mask="*Play(*"
link(onTrue,9744779:doEvent1,[])
link(Str,15927936:Var1,[(699,334)(741,334)])
}
Add(Memory,4688055,609,399)
{
link(onData,3590115:doCompare,[])
}
Add(GetDataEx,15927936,735,340)
{
Angle=3
link(Data,4688055:Value,[(676,345)(676,443)(615,443)])
}
Add(Hub,9744779,770,406)
{
link(onEvent1,3982735:doStop,[(824,412)(824,400)(527,400)(527,412)])
link(onEvent2,6191888:doSearch,[(850,419)(850,405)])
}
Add(Str_Enum,3982735,539,399)
{
Delimiter=">"
link(onEnum,4688055:doValue,[])
}
Add(BASS_Init,16662481,-77,77)
{
link(Device,1378916:Value,[])
link(Handle,2953706:Handle,[(-57,65)(-120,65)(-120,107)(-239,107)])
}
Add(BASS_ChannelPlay,9176789,1379,399)
{
Channel="test"
}
Add(BASS_StreamCreateURL,13074198,1190,399)
{
Name="test"
ParsePlayList=1
link(onCreate,12997795:doRepeat,[])
link(URL,14518012:Value,[(1196,387)(1161,387)(1161,443)(1126,443)])
}
Add(Memory,11632660,210,399)
{
link(onData,93692:doString,[])
}
Add(Memory,1378916,-77,7)
{
Default=Integer(-1)
}
Add(Charset,15271506,105,399)
{
Type=12
link(onCharset,11632660:doValue,[])
}
Add(Charset,10148695,49,399)
{
Type=6
link(onCharset,15271506:doCharset,[])
}
Add(Repeat,12997795,1260,399)
{
Op2=Integer(0)
link(onRepeat,4463557:doSleepMks,[])
link(Op1,9176789:State,[(1266,387)(1312,387)(1312,443)(1385,443)])
}
Add(Sleep,4463557,1316,399)
{
Delay=700000
link(onSleep,9176789:doPlay,[])
}
Add(HubEx,13431795,777,35)
{
link(onEvent,11217035:doValue,[])
}
Список кодов для других языков: http://dl.dropbox.com/u/65275828/language.zip
------------ Дoбавленo в 15.53:
в последней версии исправил проблему с русским и другими языками (кодировка была не правильной) теперь отлично работает!! Только иногда обрывается на полуслове.