AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Leetspeaker

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
J4YP33



Joined: 13 May 2008
Posts: 5

PostPosted: Wed May 14, 2008 3:42 pm    Post subject: Leetspeaker Reply with quote

i wrote this out of boredom... it is just a "for fun" program. what it does is to remap keys and replace them with a 'l337' equivalent. for example: +h!s !s SOMe $4MPlE +eXt. 7HIs !5 m0R3 $aMPl3 +3xt. 7HI5 !s eV3N MOR3 saMpl3 T3x+. this is not meant for serious purposes as i myself doubt that 'l33t' is legible to normal humans... Confused

Code:
MsgBox,
( LTrim
l33tspe4ker H@s b3en Activ4t3d!
-------to exit, press Alt + q-------
)
;-----------------------------------------------;
!q::
MsgBox T#AnK Y0u PhOR U$!NG L3eT5PE4K3R!
sleep 100
exitapp
return
;-----------------------------------------------;
random(){
random, rand, 1, 4
return rand
}
;-----------------------------------------------;
$a::
rand := random()
if(rand=1)
send, a
else if(rand=2)
send, A
else if(rand=3)
send, 4
else
send, @
return
;-----------------------------------------------;
$b::
rand := random()
if(rand=1)
send, b
else if(rand=2)
send, B
else if(rand=3)
send, 8
else
send, 8
return
;-----------------------------------------------;
$c::
rand := random()
if(rand=1)
send, c
else if(rand=2)
send, C
else if(rand=3)
send, [
else
send, (
return
;-----------------------------------------------;
$d::
rand := random()
if(rand=1)
send, d
else if(rand=2)
send, D
else if(rand=3)
send, ])
else
send, D
return
;-----------------------------------------------;
$e::
rand := random()
if(rand=1)
send, e
else if(rand=2)
send, E
else if(rand=3)
send, 3
else
send, 3
return
;-----------------------------------------------;
$f::
rand := random()
if(rand=1)
send, f
else if(rand=2)
send, F
else if(rand=3)
send, ph
else
send, F
return
;-----------------------------------------------;
$g::
rand := random()
if(rand=1)
send, g
else if(rand=2)
send, G
else if(rand=3)
send, 9
else
send, 9
return
;-----------------------------------------------;
$h::
rand := random()
if(rand=1)
send, h
else if(rand=2)
send, H
else if(rand=3)
send, H
else
sendraw, #
return
;-----------------------------------------------;
$i::
rand := random()
if(rand=1)
send, i
else if(rand=2)
send, I
else if(rand=3)
sendraw, !
else
sendraw, !
return
;-----------------------------------------------;
$j::
rand := random()
if(rand=1)
send, j
else if(rand=2)
send, J
else if(rand=3)
send, J
else
send, J
return
;-----------------------------------------------;
$k::
rand := random()
if(rand=1)
send, k
else if(rand=2)
send, K
else if(rand=3)
send, l<
else
send, l<
return
;-----------------------------------------------;
$l::
rand := random()
if(rand=1)
send, l
else if(rand=2)
send, L
else if(rand=3)
send, L
else
send, 1
return
;-----------------------------------------------;
$m::
rand := random()
if(rand=1)
send, m
else if(rand=2)
send, M
else if(rand=3)
send, M
else
send, m
return
;-----------------------------------------------;
$n::
rand := random()
if(rand=1)
send, n
else if(rand=2)
send, N
else if(rand=3)
send, N
else
send, N

return
;-----------------------------------------------;
$o::
rand := random()
if(rand=1)
send, o
else if(rand=2)
send, O
else if(rand=3)
send, 0
else
send, 0
return
;-----------------------------------------------;
$p::
rand := random()
if(rand=1)
send, p
else if(rand=2)
send, P
else if(rand=3)
send, 9
else
send, 9
return
;-----------------------------------------------;
$q::
rand := random()
if(rand=1)
send, q
else if(rand=2)
send, Q
else if(rand=3)
send, Q
else
send, Q
return
;-----------------------------------------------;
$r::
rand := random()
if(rand=1)
send, r
else if(rand=2)
send, R
else if(rand=3)
send, R
else
send, r
return
;-----------------------------------------------;
$s::
rand := random()
if(rand=1)
send, s
else if(rand=2)
send, S
else if(rand=3)
send, 5
else
sendraw, $
return
;-----------------------------------------------;
$t::
rand := random()
if(rand=1)
send, t
else if(rand=2)
send, T
else if(rand=3)
sendraw, +
else
send, 7
return
;-----------------------------------------------;
$u::
rand := random()
if(rand=1)
send, u
else if(rand=2)
send, U
else if(rand=3)
send, v
else
send, U
return
;-----------------------------------------------;
$v::
rand := random()
if(rand=1)
send, v
 
else if(rand=2)
send, V
else if(rand=3)
send, V
else
send, V
return
;-----------------------------------------------;
$w::
rand := random()
if(rand=1)
send, w
else if(rand=2)
send, W
else if(rand=3)
send, vv
else
send, vv
return
;-----------------------------------------------;
$x::
rand := random()
if(rand=1)
send, x
else if(rand=2)
send, X
else if(rand=3)
send, ><
else
send, ><
return
;-----------------------------------------------;
$y::
rand := random()
if(rand=1)
send, y
else if(rand=2)
send, Y
else if(rand=3)
send, Y
else
send, Y
return
;-----------------------------------------------;
$z::
rand := random()
if(rand=1)
send, z
else if(rand=2)
send, Z
else if(rand=3)
send, 2
else
send, 2
return
;-----------------------------------------------;


oh yeah, i think the code is too long. over 300 lines. does anyone have any idea how to shorten it?
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Wed May 14, 2008 4:08 pm    Post subject: Reply with quote

Code:

$a::
$b::
$c::
; etcet.
   k := A_ThisHotkey

   IfEqual, k, a, Send, % r("a, A, 4, @")
   IfEqual, k, b, Send, % r("b, B, 8")
   IfEqual, k, c, Send, % r("c, C, [, (")
   ; etcet.

Return

r(x)
{
   StringSplit, x, x, `, , %A_Space% ; create array from string
   Random, r, 1, x0  ; pick a random number between 1 and the array length
   Return x%r% ; return the corresponding substring
}



not-tested
Back to top
n-l-i-d
Guest





PostPosted: Wed May 14, 2008 7:07 pm    Post subject: Reply with quote

Or, even shorter:

Code:
; create list
allKeys =
(
a,A,4,@
b,B,8
c,C,[,(
)

; create hotkeys
; Hotkey, IfWinActive, ahk_class Notepad
Loop, Parse, allKeys, `n
{
   StringSplit, keyArr, A_LoopField, `,
   Hotkey, %keyArr1%, KeyGo
}

Return ; end of auto-execute section

KeyGo:
   thisKey := A_ThisHotkey
   Loop, Parse, allKeys, `n
   {
      StringLeft, aKey, %A_LoopField%, 1
      if (aKey = thisKey) ; check for key
      {
           StringSplit, keyArr, A_LoopField, `,
           Break
      }
   }
   Random, r, 1, %keyArr0%
   Send, % keyArr%r%
Return


not-tested
Back to top
Gakusei



Joined: 09 Jan 2008
Posts: 15

PostPosted: Thu May 15, 2008 7:06 pm    Post subject: Reply with quote

lOl!! FvN 70 u$E aT W0Rl<, tH0U9h I ])0N'7 r3coMMeN]) YoU ac(+Ua1lY USe it aT vvOrl<.

I vv0vlD L!l<E 7o $e3 YoUR VEr5i0N, N-L-!-d
Back to top
View user's profile Send private message
vipers



Joined: 24 Jul 2008
Posts: 16

PostPosted: Thu Jul 24, 2008 8:55 pm    Post subject: Reply with quote

HAhA, t#!$ I$ h!LAr!ouS. I'M 9ONn4 US3 7h!$ Al ld@Y Very Happy

ThANK yUO VerY MUcH.
Back to top
View user's profile Send private message
Bigrob55



Joined: 24 Sep 2007
Posts: 37

PostPosted: Mon Nov 17, 2008 8:04 pm    Post subject: Reply with quote

LOLOLOL

AW3$0m3 pRo9ram Br0!

Now a1l +H3 giR1S 4R3 90iN T0 w4N+ +o r!D3 In mY roFlYcoPt3r!! Very Happy
_________________
Bigrob

L337 Speak - A Ventrilo Client Side program

Winamp Sound Changer - Change Audio Output on the Fly!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group