Gelismis Yazi Tipi Addonu

alias yati {
if $dialog(yazitip) = $null { dialog -m yazitip yazitip }
else { halt }
}

dialog yazitip {
title “Yazıtipi”
size 250 150 110 170
radio “Elit”,1,10 10 90 20
radio “Full Ascii”,2,10 30 90 20
radio “Ters”,3,10 50 90 20
radio “Büyük-Küçük”,4,10 70 90 20
radio “Renkli”,5,10 90 90 20
radio “Normal”,19,10 110 90 20
box “”,20,5 0 100 135
button “Tamam”,21,5 145 100 20,ok
}
on 1:dialog:yazitip:sclick:1:{ .disable #ters | .disable #elit | .enable #turkce | .disable #buykuc | .disable #renkli }
on 1:dialog:yazitip:sclick:2:{ .disable #ters | .enable #elit | .disable #turkce | .disable #buykuc | .disable #renkli }
on 1:dialog:yazitip:sclick:3:{ .enable #ters | .disable #elit | .disable #turkce | .disable #buykuc | .disable #renkli }
on 1:dialog:yazitip:sclick:4:{ .disable #ters | .disable #elit | .disable #turkce | .enable #buykuc | .disable #renkli }
on 1:dialog:yazitip:sclick:5:{ .enable #renkli | .disable #ters | .disable #elit | .disable #turkce | .disable #buykuc }
on 1:dialog:yazitip:sclick:19:{ .disable #renkli | .disable #ters | .disable #elit | .disable #turkce | .disable #buykuc }
on 1:dialog:yazitip:init:0:{
if ($group(#turkce).status == on ) { did -c yazitip 1 }
if ($group(#elit).status == on ) { did -c yazitip 2 }
if ($group(#ters).status == on ) { did -c yazitip 3 }
if ($group(#buykuc).status == on ) { did -c yazitip 4 }
if ($group(#renkli).status == on ) { did -c yazitip 5 }
if ($group(#turkce).status == off ) && ($group(#elit).status == off ) && ($group(#ters).status == off ) && ($group(#buykuc).status == off ) && ($group(#renkli).status == off ) { did -c yazitip 19 }
}
#renkli on
on 1:INPUT:*:{
unset %ahenk*
set %ahenkk $1-
if ( $chr(47) == $mid(%ahenkk,1,1) ) { %ahenkk | halt }
set %ahenku $len(%ahenkk)
set %ahenks 1
:ilk
if ( %ahenks > %ahenku ) goto son
set %ahenkh $mid(%ahenkk,%ahenks,1)
if ( %ahenkh == $chr(32) ) {
%ahenkh = $replace(%ahenkh,$chr(32),$chr(0160))
}
%ahenkt = %ahenkt $+  $+ $rand(3,13) $+ %ahenkh
inc %ahenks
goto ilk
:son
say %ahenkt
unset %ahenk*
halt
}
#renkli end
#turkce off
on 1:INPUT:*:{
unset %turkce
set %turkce $1-
if ( $chr(47) == $mid(%turkce,1,1) ) { %turkce | halt }
%turkce = $replace(%turkce,ı,I)
%turkce = $replace(%turkce,İ,I)
%turkce = $replace(%turkce,ş,$)
%turkce = $replace(%turkce,Ş,$)
%turkce = $replace(%turkce,ç,c)
%turkce = $replace(%turkce,Ç,c)
%turkce = $replace(%turkce,ğ,G)
%turkce = $replace(%turkce,Ğ,G)
%turkce = $replace(%turkce,ü,u)
%turkce = $replace(%turkce,Ü,U)
%turkce = $replace(%turkce,b,ß)
%turkce = $replace(%turkce,B,ß)
%turkce = $replace(%turkce,<,«)
%turkce = $replace(%turkce,>,»)
say %turkce
unset %turkce
halt
}
#turkce end
#elit off
on 1:INPUT:*:{
unset %elit
set %elit $1-
if ( $chr(47) == $mid(%elit,1,1) ) { %elit | halt }
%elit = $replace(%elit,a,å)
%elit = $replace(%elit,b,ß)
%elit = $replace(%elit,c,©)
%elit = $replace(%elit,d,D)
%elit = $replace(%elit,e,ë)
%elit = $replace(%elit,f,F)
%elit = $replace(%elit,h,]-[)
%elit = $replace(%elit,i,î)
%elit = $replace(%elit,k,|{)
%elit = $replace(%elit,l,£)
%elit = $replace(%elit,m,M)
%elit = $replace(%elit,n,ñ)
%elit = $replace(%elit,o,ø)
%elit = $replace(%elit,p,P)
%elit = $replace(%elit,q,¶)
%elit = $replace(%elit,r,®)
%elit = $replace(%elit,s,§)
%elit = $replace(%elit,t,±)
%elit = $replace(%elit,u,µ)
%elit = $replace(%elit,v,V)
%elit = $replace(%elit,w,\\’)
%elit = $replace(%elit,x,×)
%elit = $replace(%elit,y,¥)
%elit = $replace(%elit,z,Z)
%elit = $replace(%elit,ı,I)
%elit = $replace(%elit,İ,Î)
%elit = $replace(%elit,ş,$)
%elit = $replace(%elit,Ş,$)
%elit = $replace(%elit,ç,¢)
%elit = $replace(%elit,Ç,¢)
%elit = $replace(%elit,ğ,g)
%elit = $replace(%elit,Ğ,Ğ)
%elit = $replace(%elit,ü,û)
%elit = $replace(%elit,Ü,Û)
%elit = $replace(%elit,ö,ô)
%elit = $replace(%elit,Ö,Ô)
%elit = $replace(%elit,!,¡)
%elit = $replace(%elit,?,¿)
%elit = $replace(%elit,<,[)
%elit = $replace(%elit,>,»)
%elit = $replace(%elit,-,¬)
%elit = $replace(%elit,:,¦)
%elit = $replace(%elit,’,)
%elit = $replace(%elit,
,’)
say %elit
unset %elit
halt
}
#elit end
#ters off
on 1:INPUT:*:{
unset %ters*
set %tersd $1-
if ( $chr(47) == $mid(%tersd,1,1) ) { %tersd | halt }
set %tersu $len(%tersd)
set %terss 1
:ilk
if ( %tersu == 0 ) goto son
if ( $mid(%tersd,%tersu,1) == $chr(32) ) {
%tersd = $replace(%tersd,$mid(%tersd,%tersu,1),$chr(0160))
}
%terst = $instok(%terst,$mid(%tersd,%tersu,1),%terss,0)
dec %tersu
inc %terss
goto ilk
:son
say %terst
unset %ters*
halt
}
#ters end
#buykuc off
on 1:INPUT:*:{
unset %buy*
set %buyk $1-
if ( $chr(47) == $mid(%buyk,1,1) ) { %buyk | halt }
set %buys 1
set %buyu $len(%buyk)
:ilk
if ( %buys > %buyu ) goto son
set %buyh $mid(%buyk,%buys,1)
if ( %buyh == $chr(32) ) {
%buyh = $replace(%buyh,$chr(32),$chr(0160))
}
%buyh = $replacecs(%buyh,q,Q,w,W,e,E,r,R,t,T,y,Y,u,U,ı,I,o,O,p,P,ğ,Ğ,ü,Ü,a,A,s,S,d,D,f,F,g,G,h,H,j,J,k,K,l,L,ş,Ş,i,İ,z,Z,x,X,c,C,v,V,b,B,n,N,m,M,ö,Ö,ç,Ç)
set %buyb %buyb $+ %buyh
inc %buys
if ( %buys > %buyu ) goto son
set %buyh $mid(%buyk,%buys,1)
if ( %buyh == $chr(32) ) {
%buyh = $replace(%buyh,$chr(32),$chr(0160))
}
%buyh = $replacecs(%buyh,Q,q,W,w,E,e,R,r,T,t,Y,y,U,u,I,ı,O,o,P,p,Ğ,ğ,Ü,ü,A,a,S,s,D,d,F,f,G,g,H,h,J,j,K,k,L,l,Ş,ş,İ,i,Z,z,X,x,C,c,V,v,B,b,N,n,M,m,Ö,ö,Ç,ç)
inc %buys
set %buyb %buyb $+ %buyh
goto ilk
:son
say %buyb
unset %buy*
halt
}
#buykuc end

Bir cevap yazın