Kod:
alias tmscumleceviri { dialog -m tmscumleceviri tmscumleceviri }
dialog tmscumleceviri {
title "Cümle Çevirici"
size -1 -1 177 153
icon $mircdirTMSResim\cumlecevirici.ico
option dbu
text "AŞAĞIDAKİ BU DİLDEN", 1, 14 15 73 8
text "ŞU DİLE ÇEVİR", 2, 115 15 94 8
combo 3, 6 24 72 50, size
combo 4, 98 23 72 50, size
box "Çevrilecek Metin", 5, 6 78 167 41
edit "", 6, 9 87 161 28
button "Cümle Çevirisini Yap", 7, 6 126 76 21
button "Diyalogu KAPAT", 8, 98 126 76 21, cancel
icon 9, 1 -6 175 25, TMSResim\cumlebayrak.jpg, 0
}
on *:dialog:tmscumleceviri:*:*:{
if ($devent = init) {
var %mdx dll dll\mdx.dll
%mdx MarkDialog $dname
%mdx SetDialog $dname bgcolor $rgb(99,184,255)
%mdx SetFont $dname 1,2,5,6 +b Turkish 12 600 Arial
%mdx SetFont $dname 7,8 +b Turkish 15 600 Arial
%mdx SetColor $dname 1,2,3,4,5,7,8,9 textbg $rgb(99,184,255)
%mdx SetColor $dname 1,2,3,4,5,7,8,9 background $rgb(99,184,255)
%mdx SetColor $dname 6 text $rgb(255,0,0)
did -r $dname 3,4
did -a $dname 3,4 tr_TÜRKÇE
did -a $dname 3,4 en_İNGİLİZCE
did -a $dname 3,4 de_ALMANCA
did -a $dname 3,4 fr_FRANSIZCA
did -a $dname 3,4 ru_RUSCA
did -a $dname 3,4 az_AZERİCE
did -a $dname 3,4 sl_YUNANCA
did -a $dname 3,4 ar_ARAPÇA
did -a $dname 3,4 pl_İBRANİCE
did -a $dname 3,4 ja_JAPONCA
did -a $dname 3,4 zh_ÇİNCE
did -a $dname 3,4 it_İTALYANCA
did -a $dname 3,4 pt_PORTEKİZCE
}
elseif ($devent = sclick) && ($did = 7) {
var %:cvr $r(1000000000,9999999999) | sockopen $+(ceviri,%:cvr) www.perfectdent.net 80
sockmark $+(ceviri,%:cvr) $+(ben=,$token($did(3),1,95),&sen=,$token($did(4),1,95),&metin=,$replace($did(6),$chr(32),$+($chr(37),20),ı,i,İ,i,Ö,o,ö,o,ü,u,Ü,u,ğ,g,Ğ,g,ç,c,Ç,c))
}
}
on *:sockopen:ceviri*: {
sockwrite -nt $sockname GET $+(/translate.php?,$sock($sockname).mark) HTTP/1.1 | sockwrite -nt $sockname Host: $sock($sockname).addr | sockwrite -nt $sockname $crlf }
on *:sockread:ceviri*:{
var %i | sockread %i | if (<body> isin %i) { $iif(!$window(@ÇEVİRİ),window -n @ÇEVİRİ) | echo -t @ÇEVİRİ $token(%i,2-,32) | did -r tmscumleceviri 6 | did -a tmscumleceviri 6 Çevirisi Yapılan Cümle @ÇEVİRİ Penceresine Yansıtıldı.. } }