mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
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,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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!


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
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


Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Where's the fun in that smile

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


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2007
Posts: 228
M
Mpot Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Apr 2007
Posts: 228
Thanks for the input, everyone.


Link Copied to Clipboard