mIRC Home    About    Download    Register    News    Help

Topic Options
#11457 - 16/02/03 05:14 AM convert text
xrn0id Offline
Fjord artisan

Registered: 23/01/03
Posts: 237
Loc: USA
how can I Convert text? lke heres an example:

Right Click>Convert Text

open a pop up titled "Text To Convert:" and whatever I put into that text box, will be read, and the letters will be changed accordingly, and then the new message (the converted one) will be displayed. Does anybody know what im talking about? lol
_________________________

;Check for Life

if (%life == $null) {
goto getlife
}

Top
#11458 - 16/02/03 05:23 AM Re: convert text
Cheech Offline
Fjord artisan

Registered: 12/12/02
Posts: 332
Loc: Louisiana, USA
you could set a %var to $$?="text to convert:" then use $replace to change what you want ? if thats not what yer lookin for can you be more specific ?

Top
#11459 - 16/02/03 05:28 AM Re: convert text
xrn0id Offline
Fjord artisan

Registered: 23/01/03
Posts: 237
Loc: USA
set %temp $?="Convert Text:"
;replace a with 1, be with 2, c with 3... etc
convert %temp
echo %temp

so if i enterd abc; it would echo 123
_________________________

;Check for Life

if (%life == $null) {
goto getlife
}

Top
#11460 - 16/02/03 05:41 AM Re: convert text
laz Offline
Babel fish

Registered: 16/12/02
Posts: 54
I think this is what you want:

Code:
  
set %temp $replace($$?="Convert text",a,1,b,2,c,3)

Top
#11461 - 16/02/03 05:42 AM Re: convert text
Cheech Offline
Fjord artisan

Registered: 12/12/02
Posts: 332
Loc: Louisiana, USA
not sure if this is what you want or not ? but this is what i was meaning
Code:
 
Menu Channel {
  Text Conversion
  .Convertor {
    set %ttc $$?="Convert Text:"
    if ( a isin %ttc ) { set %ttc $replace(%ttc,a,1) }
    if ( b isin %ttc ) { set %ttc $replace(%ttc,b,2) }
    if ( c isin %ttc ) { set %ttc $replace(%ttc,c,3) }
    say %ttc 
  }
}
 

if i want to be cool i would learn my abc's
would come out like this
if i w1nt to 2e 3ool i would le1rn my 123's
hope that helps

Top
#11462 - 16/02/03 05:44 AM Re: convert text
xrn0id Offline
Fjord artisan

Registered: 23/01/03
Posts: 237
Loc: USA
yes thats exactally what i want, thanks
_________________________

;Check for Life

if (%life == $null) {
goto getlife
}

Top
#11463 - 16/02/03 05:45 AM Re: convert text
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
By the way, mircscripts.org has a few nice talkers, if you wanna try. I especially loved the 'drunk talker'.

Top
#11464 - 16/02/03 05:48 AM Re: convert text
The_Game Offline
Hoopy frood

Registered: 10/12/02
Posts: 1237
Loc: Michigan, USA
I seen that talker. What exactly does that do? I was actually afraid to download it because I wasn't sure what it did. Could you explain?

Top
#11465 - 16/02/03 05:48 AM Re: convert text
Cheech Offline
Fjord artisan

Registered: 12/12/02
Posts: 332
Loc: Louisiana, USA
ah i might have a look but i built my own was one of the first
things i scripted smile thx
one of these days when i figure out regex i could probably condense it quite a bit .. lol

Top
#11466 - 16/02/03 05:54 AM Re: convert text
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
Not too difficult, just paste the 'Drunk Talker' into mIRC remote and type /dr <text> in the channel... you'd love the result :tongue:. It doesn't use an on Input event, so your messages will not be interrupted at all.

Top
#11467 - 16/02/03 05:58 AM Re: convert text
The_Game Offline
Hoopy frood

Registered: 10/12/02
Posts: 1237
Loc: Michigan, USA
Ok I will check it out. Its hilarious you say?

Top
#11468 - 16/02/03 05:58 AM Re: convert text
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
I love regex because it usually shortens code, and makes it faster. If you want to learn it you can start here. man.txt is also a great reference.

Top
#11469 - 16/02/03 06:04 AM Re: convert text
Online Offline
Hoopy frood

Registered: 09/12/02
Posts: 1922
yea

Top
#11470 - 16/02/03 06:29 AM Re: convert text
xrn0id Offline
Fjord artisan

Registered: 23/01/03
Posts: 237
Loc: USA
//xrn0id decode
Menu Channel {
tExT cRiPt
.EnCrIpT tExT {
set %ttc $$?="EnCrIpT tExT:"
if ( a isin %ttc ) {
set %ttc $replace(%ttc,a,%)
}
if ( b isin %ttc ) {
set %ttc $replace(%ttc,b,!)
}
if ( c isin %ttc ) {
set %ttc $replace(%ttc,c,&)
}
if ( d isin %ttc ) {
set %ttc $replace(%ttc,d,^)
}
if ( e isin %ttc ) {
set %ttc $replace(%ttc,e,@)
}
if ( f isin %ttc ) {
set %ttc $replace(%ttc,f,*)
}
if ( g isin %ttc ) {
set %ttc $replace(%ttc,g,f)
}
if ( h isin %ttc ) {
set %ttc $replace(%ttc,h,4)
}
if ( i isin %ttc ) {
set %ttc $replace(%ttc,i,u)
}
if ( j isin %ttc ) {
set %ttc $replace(%ttc,j,6)
}
if ( k isin %ttc ) {
set %ttc $replace(%ttc,k,2)
}
if ( l isin %ttc ) {
set %ttc $replace(%ttc,l,a)
}
if ( m isin %ttc ) {
set %ttc $replace(%ttc,m,3)
}
if ( n isin %ttc ) {
set %ttc $replace(%ttc,n,g)
}
if ( o isin %ttc ) {
set %ttc $replace(%ttc,o,u)
}
if ( p isin %ttc ) {
set %ttc $replace(%ttc,p,7)
}
if ( q isin %ttc ) {
set %ttc $replace(%ttc,q,1)
}
if ( r isin %ttc ) {
set %ttc $replace(%ttc,r,9)
}
if ( s isin %ttc ) {
set %ttc $replace(%ttc,s,4)
}
if ( t isin %ttc ) {
set %ttc $replace(%ttc,t,m)
}
if ( u isin %ttc ) {
set %ttc $replace(%ttc,u,8)
}
if ( v isin %ttc ) {
set %ttc $replace(%ttc,v,5)
}
if ( w isin %ttc ) {
set %ttc $replace(%ttc,w,z)
}
if ( x isin %ttc ) {
set %ttc $replace(%ttc,x,x)
}
if ( y isin %ttc ) {
set %ttc $replace(%ttc,y,w)
}
if ( z isin %ttc ) {
set %ttc $replace(%ttc,z,6)
}
say %ttc
unset %ttc
}
.DeCrIpT tExT {
set %ttc $$?="DeCrIpT tExT:"
if ( $chr(37) isin %ttc ) {
set %tcc $replace(%ttc,$chr(37),a)
}
if ( $chr(33) isin %tcc ) {
set %tcc $replace(%ttc,$chr(33),b)
}
if ( $chr(38) isin %tcc ) {
set %tcc $replace(%ttc,$chr(38),c)
}
say %ttc
unset %ttc
}


so why does that do this?

abc > %!&

%!& > %!& (donst cover to abc)
_________________________

;Check for Life

if (%life == $null) {
goto getlife
}

Top
#11471 - 16/02/03 06:36 AM Re: convert text
Cheech Offline
Fjord artisan

Registered: 12/12/02
Posts: 332
Loc: Louisiana, USA
try just using %,!,& instead of the $chr

Top
#11472 - 16/02/03 06:55 AM Re: convert text
xrn0id Offline
Fjord artisan

Registered: 23/01/03
Posts: 237
Loc: USA
that was my first try, and it did the same thing
_________________________

;Check for Life

if (%life == $null) {
goto getlife
}

Top
#11473 - 16/02/03 08:41 AM Re: convert text
Hammer Offline
Hoopy frood

Registered: 07/12/02
Posts: 1321
Loc: Georgia, USA
You are also replacing some characters with characters that will, themselves, be replaced later. *tsk tsk tsk*
_________________________
DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Top