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 

hotkey calling itself

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
J4YP33



Joined: 13 May 2008
Posts: 5

PostPosted: Tue May 13, 2008 2:46 pm    Post subject: hotkey calling itself Reply with quote

hi guys,

I am trying to make a "leetspeaker" but I have a problem. Basically, when a character is typed, it is replaced by a "l33t" equivalent. For example, 'a' will be replaced by 'A' or '@' or '4' or remain as 'a'.

Code:
random(){
random, x, 1, 4
return x
}

a::
x := random()
if(x=1){
send, a

else if(x=2){
send, A
}
else if(x=3){
send, 4
}
else{
send, @
}
return


Problem here is that i cannot get 'a' to remain as 'a' as the hotkey will be calling itself. Can anyone help?
Back to top
View user's profile Send private message
stewie7griffin
Guest





PostPosted: Tue May 13, 2008 2:53 pm    Post subject: leet speaker Reply with quote

yeah i made a leet speaker but i jus did

a::send {4}
b::send {13}
c::send {(}

alll the way through the alphabet Smile
Back to top
stewie7griffin
Guest





PostPosted: Tue May 13, 2008 2:55 pm    Post subject: srry for repost Reply with quote

srry for repost but correction on the b action you gotta do
b::send {1}{3} not {13} my bad Smile its a much simpilar way
Back to top
J4YP33



Joined: 13 May 2008
Posts: 5

PostPosted: Tue May 13, 2008 3:03 pm    Post subject: Reply with quote

but that doesn't do random characters does it? oh well.. the problem I am facing is that when 'a' is typed, the result of the random cannot be 'a' as "send, a" will activate the hotkey again, repeating the process. below is some sample output...

4@@AA@44444AAA4A4AA44A4A4A@AA4@AA@A@@@@@A4A@4@AAA@@@

'a' never appears as it just activates the hotkey again.
Back to top
View user's profile Send private message
tank



Joined: 21 Dec 2007
Posts: 403

PostPosted: Tue May 13, 2008 3:47 pm    Post subject: Reply with quote

J4YP33 wrote:
but that doesn't do random characters does it? oh well.. the problem I am facing is that when 'a' is typed, the result of the random cannot be 'a' as "send, a" will activate the hotkey again, repeating the process. below is some sample output...

4@@AA@44444AAA4A4AA44A4A4A@AA4@AA@A@@@@@A4A@4@AAA@@@

'a' never appears as it just activates the hotkey again.

Suspend
Code:

random(){
random, x, 1, 4
return x
}

a::
x := random()
if(x=1){
suspend, on
send, a
suspend,off
}
else if(x=2){
send, A
}
else if(x=3){
send, 4
}
else{
send, @
}
return

works perfectly
st4rted opened notepAd oh And this window too
4aaAA4aaaa@Aaa4@4aa@44@4A@aaaaaaaa@4a4a4@4aA4aaaaaaa@AAAAaa@A@@@4AAA4aaAAa@A@aa4AA@444AA@

4A4@@4A444@@4A@Aa@@4@4aa@44aaa@a@4aaaaa@4AAA4AAaA4A@44@44@aa@4a4aa444a4aaaa4 plum silly you @re for this
_________________
Read this
Com
Automate IE7 with Tabs


Last edited by tank on Tue May 13, 2008 3:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
tank



Joined: 21 Dec 2007
Posts: 403

PostPosted: Tue May 13, 2008 3:52 pm    Post subject: Reply with quote

i c@nt possibly imagin why but i thougth you mind get some entertAinment out of this
http://www.autohotkey.com/forum/viewtopic.php?t=27429&highlight=press+key
_________________
Read this
Com
Automate IE7 with Tabs
Back to top
View user's profile Send private message
J4YP33



Joined: 13 May 2008
Posts: 5

PostPosted: Tue May 13, 2008 3:55 pm    Post subject: Reply with quote

thank you!!!
problem solved Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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