  directory change,@path(%0) 
  external vdsipp.dll 
  
  DIALOG CREATE,FreeTranslation.com,-1,0,370,172
  DIALOG ADD,EDIT,TEXT,4,2,180,140,,MULTI,SCROLL,WRAP
  DIALOG ADD,EDIT,TRANSLATION,4,188,180,140,,MULTI,SCROLL,WRAP
  DIALOG ADD,COMBO,FROMTO,148,2,180,21,,LIST
  DIALOG ADD,BUTTON,TRANSLATE,148,188,180,20,TRANSLATE
  DIALOG SHOW
list loadtext,fromto
"English/Spanish
"English/French
"English/German
"English/Italian
"English/Norwegian
"English/Portuguese
"Spanish/English
"French/English
"German/English
"Italian/English
"Portuguese/English
"-------------------
"Spanish/French
"Spanish/German
"Spanish/Italian
"Spanish/Portuguese
"French/Spanish
"French/German
"French/Italian
"French/Portuguese
"German/Spanish
"German/French
"German/Italian
"German/Portuguese
"Italian/Spanish
"Italian/French
"Italian/German
"Italian/Portuguese
"Portuguese/Spanish
"Portuguese/French
"Portuguese/German
"Portuguese/Italian

list seek,fromto,0

:Evloop
wait event
%%event = @event()
goto %%event

:TranslateBUTTON
if @greater(11,@index(fromto))
  internet http,create,1 
  internet http,threads,1,off 
  internet http,protocol,1,1 
  internet http,useragent,1,"Internet Explorer" 
  internet http,post,1,"http://ets.freetranslation.com:5081/","Sequence=core&Mode=html&template=TextResults2.htm&Language="@item(fromto)"&SrcText="@dlgtext(text)
  %%translation = @internet(http,content,1)
  internet http,destroy,1
  %%searchstring1 = <textarea name=@chr(34)textfield@chr(34) cols=@chr(34)45@chr(34) rows=@chr(34)15@chr(34) wrap=@chr(34)virtual@chr(34)>
  %%searchstring2 = </textarea>
  %%translation = @strdel(%%translation,1,@pred(@fadd(@pos(%%searchstring1,%%translation),@len(%%searchstring1))))
  %%translation = @strdel(%%translation,@pos(%%searchstring2,%%translation),@len(%%translation))
  dialog set,translation,%%translation
  else
  internet http,create,1 
  internet http,threads,1,off 
  internet http,protocol,1,1 
  internet http,useragent,1,"Internet Explorer" 
  option fieldsep,/
  parse "%1;%2",@item(fromto)
  internet http,post,1,"http://ets.freetranslation.com:5081/","Sequence=core&Mode=html&template=TextResults2.htm&Language="%1"/English&SrcText="@dlgtext(text)
  %%translation = @internet(http,content,1)
  %%searchstring1 = <textarea name=@chr(34)textfield@chr(34) cols=@chr(34)45@chr(34) rows=@chr(34)15@chr(34) wrap=@chr(34)virtual@chr(34)>
  %%searchstring2 = </textarea>
  %%translation = @strdel(%%translation,1,@pred(@fadd(@pos(%%searchstring1,%%translation),@len(%%searchstring1))))
  %%translation = @strdel(%%translation,@pos(%%searchstring2,%%translation),@len(%%translation))
  internet http,post,1,"http://ets.freetranslation.com:5081/","Sequence=core&Mode=html&template=TextResults2.htm&Language=English/"%2"&SrcText="%%translation
  %%translation = @internet(http,content,1)
  internet http,destroy,1
  %%searchstring1 = <textarea name=@chr(34)textfield@chr(34) cols=@chr(34)45@chr(34) rows=@chr(34)15@chr(34) wrap=@chr(34)virtual@chr(34)>
  %%searchstring2 = </textarea>
  %%translation = @strdel(%%translation,1,@pred(@fadd(@pos(%%searchstring1,%%translation),@len(%%searchstring1))))
  %%translation = @strdel(%%translation,@pos(%%searchstring2,%%translation),@len(%%translation))
  
  dialog set,translation,%%translation
  end
goto evloop

:Close
exit