Posted By: Mpot
Wrapping text around keyboard - 19/04/08 07:45 PM
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?
Posted By: qwerty
Re: Wrapping text around keyboard - 19/04/08 08:06 PM
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!
Posted By: Mpot
Re: Wrapping text around keyboard - 19/04/08 08:09 PM
Wow, that looks like a project. x_x
Posted By: Darwin_Koala
Re: Wrapping text around keyboard - 19/04/08 10:03 PM
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
Posted By: qwerty
Re: Wrapping text around keyboard - 19/04/08 11:00 PM
Where's the fun in that

Note to the OP: if you follow the replace approach, make sure you use $replace
xcs().
Posted By: Riamus2
Re: Wrapping text around keyboard - 19/04/08 11:37 PM
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.
Posted By: Mpot
Re: Wrapping text around keyboard - 20/04/08 01:34 AM
Thanks for the input, everyone.