#NewScriptBegin kenny
 
Function Translate(Text)
  StrOut=""
  i=1
  do until i > len(Text)
    C=mid(Text,i,1)
    tch=lcase(mid(Text,i,1))
    if tch="a" Then C="mmm"
    if tch="b" Then C="mmp"
    if tch="c" Then C="mmf"
    if tch="d" Then C="mpm"
    if tch="e" Then C="mpp"
    if tch="f" Then C="mpf"
    if tch="g" Then C="mfm"
    if tch="h" Then C="mfp"
    if tch="i" Then C="mff"
    if tch="j" Then C="pmm"
    if tch="k" Then C="pmp"
    if tch="l" Then C="pmf"
    if tch="m" Then C="ppm"
    if tch="n" Then C="ppp"
    if tch="o" Then C="ppf"
    if tch="p" Then C="pfm"
    if tch="q" Then C="pfp"
    if tch="r" Then C="pff"
    if tch="s" Then C="fmm"
    if tch="t" Then C="fmp"
    if tch="u" Then C="fmf"
    if tch="v" Then C="fpm"
    if tch="w" Then C="fpp"
    if tch="x" Then C="fpf"
    if tch="y" Then C="ffm"
    if tch="z" Then C="ffp"
    i=i+1
    StrOut=StrOut & C
  loop
  LastMsg(GetCaption(FrontFrameID))=StrOut
  Translate=StrOut
End Function
 
Function ReTranslate(Text)
  StrOut=""
  tch=""
  i=1
  do until i > len(Text)
    C=mid(Text,i,1)
    if C="m" or C="p" or C="f" Then
      tch=tch+C
      C=""
    end if
    if len(tch)=3 Then
      if tch="mmm" Then C="a"
      if tch="mmp" Then C="b"
      if tch="mmf" Then C="c"
      if tch="mpm" Then C="d"
      if tch="mpp" Then C="e"
      if tch="mpf" Then C="f"
      if tch="mfm" Then C="g"
      if tch="mfp" Then C="h"
      if tch="mff" Then C="i"
      if tch="pmm" Then C="j"
      if tch="pmp" Then C="k"
      if tch="pmf" Then C="l"
      if tch="ppm" Then C="m"
      if tch="ppp" Then C="n"
      if tch="ppf" Then C="o"
      if tch="pfm" Then C="p"
      if tch="pfp" Then C="q"
      if tch="pff" Then C="r"
      if tch="fmm" Then C="s"
      if tch="fmp" Then C="t"
      if tch="fmf" Then C="u"
      if tch="fpm" Then C="v"
      if tch="fpp" Then C="w"
      if tch="fpf" Then C="x"
      if tch="ffm" Then C="y"
      if tch="ffp" Then C="z"
      tch=""
    end if
    i=i+1
    StrOut=StrOut & C
  loop
  ReTranslate=StrOut
End Function
 
Sub Load()
  LastMsg("0")=""
End Sub
 
Sub KeyShortcut(KeyCode, Shift)
  if Shift=0 and KeyCode=123 Then
    Send Translate(TextBox), FrontFrameID
    TextBox=""
    skipevent
  End if
  if Shift=0 and KeyCode=122 Then
    print "~ Übersetzung: " & ReTranslate(LastMsg(GetCaption(FrontFrameID)))
  end if
End Sub
 
Sub Chan_Msg(Text, Nick, Channel, FrameID, ConnID)
  LastMsg(Channel)=Text
End Sub

© Kenny & Mirici


Eigene Werkzeuge