Source language: Translate to:

Simple Dictionary

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Simple Dictionary

Postby MiNeoBook » Sun Jan 11, 2015 7:20 pm

A simple example
Put in a Button, and test
Code: Select all
{NeoBook 5 Objects}
NeoBookVer=5.80
ObjectType=3
Name=PushButton1
X=63
Y=19
W=295
H=125
Anchor=0
Text=          Dictionary Sample¶¶Key     (Spanish): [Key]¶Value  (English) : [Value1]¶Value  (French)  : [Value2]
Align=1
ImageStyle=0
ObjAction=.. 1st DICTIONARY¶setvar "[NomDic1]" "Es_En"¶¶..Create Key1:Value1, Key2,Value2...¶.. Spanish to English¶strparse "Rojo:Red,Verde:Green,Azul:Blue" "," "[xdic]" "[x]"¶loop "1" "[x]" "[c]"¶    strparse "[xdic[c]]" ":" "[xdic[c]]" "[v]"¶    setvar "[[NomDic1].[xdic[c]1]]" "[xdic[c]2]"¶endloop¶deletearray "[xDic]" "All"¶¶.. 2nd DICTIONARY¶.. Englis to French¶setvar "[NomDic2]" "En_Fr"¶strparse "Red:Rouge,Green:Vert,Blue:Bleu" "," "[xdic]" "[x]"¶loop "1" "[x]" "[c]"¶    strparse "[xdic[c]]" ":" "[xdic[c]]" "[v]"¶    setvar "[[NomDic2].[xdic[c]1]]" "[xdic[c]2]"¶endloop¶deletearray "[xDic]" "All"¶¶..KEY to search in Dictionary #1¶setvar "[Key]" "Verde"¶¶...Process¶setvar "[Value1]" "[[NomDic1].[Key]]"¶¶... VALUE1 it is the Second KEY¶setvar "[Value2]" "[[NomDic2].[Value1]]"¶¶.alertbox "RESULT" "Key (Spanish): [Key]|Value (English): [Value1]|Value (French): [Value2]"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=12
FontStyle=3
FontCharset=1
TextColor=0
TabOrder=2

Enjoy
posting.php?mode=post&f=2#
MiNeoBook
 
Posts: 7
Joined: Mon Dec 08, 2014 9:40 am

Re: Simple Dictionary

Postby Neosoft Support » Mon Jan 12, 2015 12:00 pm

Interesting. I suppose someone could expand on this by adding additional words to the dictionary.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest