mIRC Home    About    Download    Register    News    Help

Print Thread
M
Mpot
Mpot
M
I know that sounds a little weird, so I'll try to explain.

Let's say you wanted to say "Want a cookie?"
You'd move the letters over by one on the keyboard, saying "Qlbr l xiijuw?"

This has no real purpose, but I thought it would be cool to script, and I figured I might learn a little more about mIRC scripting.

So basically, would there be a way to have mIRC encode and decode this? I don't think that the $asc is in sequential order, so I don't think $calc($asc($1)+ 1)) would work. Ideas?

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
You could have the 3 keyboard rows in separate strings, then use $mid, $pos and other related identifiers.

In order to implement the wrapping effect you could either check for boundaries (if <letter position> == 1 then wrap) or use the mod operator % with $calc, eg $calc(10 % 3).

You may also need the isletter /if operator.

You'll need to look all these up in the help file. Start by typing /help text and number identifiers. Happy scripting!

M
Mpot
Mpot
M
Wow, that looks like a project. x_x

Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
Basically, you are only working on the non-special characters, so a simple "replace" may suffice:

replace $1- a,s; s, d; d,f ; f, g; g, h; h, j; j,k; k,l; l,a

etc.

Don't have mIRC running at the moment, so I can't check on the syntax of replace/replace cs.

Cheers,

DK

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
Where's the fun in that smile

Note to the OP: if you follow the replace approach, make sure you use $replacexcs().

Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
As long as you're only doing that to letters, they are in sequential order. If you want to do it for other characters, such as puntuation, you'll have to manually set it up.

M
Mpot
Mpot
M
Thanks for the input, everyone.


Link Copied to Clipboard