AutoHotkey Community

It is currently May 26th, 2012, 6:43 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: June 17th, 2009, 9:00 pm 
Offline

Joined: June 12th, 2009, 11:36 pm
Posts: 1173
Location: Indianapolis IN, USA
I revisited an old script I wrote a year ago that translates your typing into four different code languages; Leet, Ong, Morse Code, and Binary. People I've sent it to had suggested I added capital letters and faster typing speed and stuff. So I added them all. Also thanks to hd0202 for helping me shorten out the code from about 700+ lines to only about 150+.

Code:
a:

SetBatchLines -1   ; here for the complete script
setkeydelay 0      ; or -1 for the send speed

lower_type0 = {4},13,(,1),3,f,g,|-|,|,j,1<,1,/\/\,|\|,0,p,q,12,5,7,u,\/,\/\/,x,y,2              ; ,...
lower_type1 = {a},bong,cong,dong,e,fong,gong,hong,i,jong,kong,long,mong,nong,o,pong,qong,rong,song,tong,u,vong,wong,xong,yong,zong            ; ,...
lower_type2 = .-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..             ; ,...
lower_type3 = 01100001,01100010,01100011,01100100,01100101,01100110,01100111,01101000,01101001,01101010,01101011,01101100,01101101,01101110,01101111,01110000,01110001,01110010,01110011,01110100,01110101,01110110,01110111,01111000,01111001,01111010   ; ,...

upper_type0 = {4},13,(,1),3,f,g,|-|,|,j,1<,1,/\/\,|\|,0,p,q,12,5,7,u,\/,\/\/,x,y,2              ; ,...
upper_type1 = {A},Bong,Cong,Dong,E,Fong,Gong,Hong,I,Jong,Kong,Long,Mong,Nong,O,Pong,Qong,Rong,Song,Tong,U,Vong,Wong,Xong,Yong,Zong            ; ,...
upper_type2 = .-,-...,-.-.,-..,.,..-.,--.,....,..,.---,-.-,.-..,--,-.,---,.--.,--.-,.-.,...,-,..-,...-,.--,-..-,-.--,--..             ; ,...
upper_type3 = 01000001,01000010,01000011,01000100,01000101,01000110,01000111,01001000,01001001,01001010,01001011,01001100,01001101,01001110,01001111,01010000,01010001,01010010,01010011,01010100,01010101,01010110,01010111,01011000,01011001,01011010   ; ,...

stringsplit, lower_t0_, lower_type0, `,
stringsplit, lower_t1_, lower_type1, `,
stringsplit, lower_t2_, lower_type2, `,
stringsplit, lower_t3_, lower_type3, `,

stringsplit, upper_t0_, upper_type0, `,
stringsplit, upper_t1_, upper_type1, `,
stringsplit, upper_t2_, upper_type2, `,
stringsplit, upper_t3_, upper_type3, `,

Gui, Font, S8 CGreen, Papyrus
Gui, Add, Text, x6 y90 w370 h90 , Welcome to TransxXx that was created by Eedis. Please select your translation language`, press = to temporarily turn the program off to go back to regular typing`, and also use - to return to the previous screen to select a new language. Thank you`, and please enjoy. :) :)
Gui, Font, S12 CGreen Bold, Quick Type II
Gui, Add, Text, x6 y180 w370 h30 , ___________________________________________________-
Gui, Add, Text, x6 y220 w100 h30 , Leet
Gui, Add, Text, x6 y270 w100 h30 , Ong
Gui, Add, Text, x6 y320 w110 h30 , Morse Code
Gui, Add, Text, x6 y370 w100 h30 , Binary
Gui, Add, Button, x256 y220 w120 h30 , 1337
Gui, Add, Button, x256 y270 w120 h30 , Ononggong
Gui, Add, Button, x256 y320 w120 h30 , .-..---.-..--..
Gui, Add, Button, x256 y370 w120 h30 , 01100101
Gui, Add, Text, x106 y270 w150 h30 , ----------------------------------------------------
Gui, Add, Text, x116 y320 w140 h30 , ----------------------------------------------------
Gui, Add, Text, x106 y370 w150 h30 , ----------------------------------------------------
Gui, Add, Button, x146 y410 w100 h30 , Exit
Gui, Font, S8 CGreen, Verdana
Gui, Add, Text, x106 y230 w150 h30 , ----------------------------------------------------
Gui, Font, S42 CGreen Bold Strike, curlz mt
Gui, Add, Text, x46 y190 w200 h-120 , __________________________________________
Gui, Add, Text, x6 y30 w370 h60 +Center, _________________________________________________
Gui, Add, Text, x26 y10 w330 h70 +Center, Trans-XxX
Gui, Show, x446 y109 h454 w389, Trans-xXx
Return

var1 = 0

buttonexit:
exitapp

button1337:
{
var1 = 0
gui, hide
}
return

buttonononggong:
{
var1 = 1
gui, hide
}
return

button.-..---.-..--..:
{
var1 = 2
gui, hide
}
return

button01100101:
{
var1 = 3
gui, hide
}
return

; lower case
$a::
$b::
$c::
$d::
$e::
$f::
$g::
$h::
$i::
$j::
$k::
$l::
$m::
$n::
$o::
$p::
$q::
$r::
$s::
$t::
$u::
$v::
$w::
$x::
$y::
$z::

thiskey := asc(substr(a_thishotkey, 2, 1)) - 96
if var1 = 0
  send % lower_t0_%thiskey%
if var1 = 1
  send % lower_t1_%thiskey%
if var1 = 2
  send % lower_t2_%thiskey% "{space}"
if var1 = 3
  send % lower_t3_%thiskey%
return

; upper case
$+a::
$+b::
$+c::
$+d::
$+e::
$+f::
$+g::
$+h::
$+i::
$+j::
$+k::
$+l::
$+m::
$+n::
$+o::
$+p::
$+q::
$+r::
$+s::
$+t::
$+u::
$+v::
$+w::
$+x::
$+y::
$+z::
thiskey := asc(substr(a_thishotkey, 3, 1)) - 96       
if var1 = 0
  send % upper_t0_%thiskey%
if var1 = 1
  send % upper_t1_%thiskey%
if var1 = 2
  send % upper_t2_%thiskey% "{space}"
if var1 = 3
  send % upper_t3_%thiskey%
return

$space::

if var1 = 0
  send {space}
if var1 = 1
  send {space}
if var1 = 2
  send /{space}
if var1 = 3
  send 01000000
return

$=::suspend
$-::      ; - awakes the script even from suspend
suspend
suspend off
goto a
return


I am currently working on adding a window to translate back to regular type as well. But it will be awhile before I get around to learning how to do that. Please comment and give suggestions I could add to this script to make it better and enjoy. :)

Thanks.

*Edit* And yes I was the one who came up with the crappy name Trans-xXx. But hey I like it. Lolz.

_________________
www.AutoHotkey.net/~Eedis
I love my wife and daughter so much.
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: fusion1920, Ragnar, Retro Gamer and 11 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group