AutoHotkey Community

It is currently May 27th, 2012, 8:22 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: February 1st, 2012, 11:36 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
I think I saw this somewhere in the documentation, but now I can't find it.
Here I have a hotkey that contains a send command sending exactly that key that is the hotkey:

Code:
t::
send t
return
In this case the hotkey starts working as a loop sending itself numerous number of times. The system blocks it when the numberof iterations is too big. How can I make it execute only one iteration upon me pressing the "t" key once?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2012, 11:39 pm 
Offline
User avatar

Joined: April 4th, 2009, 8:19 pm
Posts: 1143
Location: Croatia
Code:
$t::
send t
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 1st, 2012, 11:49 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
Thank you Learning one!!!!!!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2012, 12:15 am 
Offline

Joined: January 29th, 2012, 11:40 pm
Posts: 51
Just out of curiosity, why would you make a hotkey to send same key?

_________________
Whenever someone says "pls" because it is shorter than "please", I say "no" because it is shorter than "yes"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2012, 12:24 am 
I'm not Benny-D, but I guess he's just posting part of code that caused problems. Probably his script looks like this
Code:
$t::
; some code here
send t
; some code here
return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2012, 12:36 am 
Offline

Joined: January 29th, 2012, 11:40 pm
Posts: 51
Ah, right... I better just go to bed before asking any more stupid questions :)

_________________
Whenever someone says "pls" because it is shorter than "please", I say "no" because it is shorter than "yes"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2012, 3:34 am 
Anonymous wrote:
I'm not Benny-D, but I guess he's just posting part of code that caused problems. Probably his script looks like this
Code:
$t::
; some code here
send t
; some code here
return

Thanks =) that was necessary. And so was this post.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 3:44 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
Anonymous wrote:
I'm not Benny-D, but I guess he's just posting part of code that caused problems. Probably his script looks like this
Code:
$t::
; some code here
send t
; some code here
return

- Yes, that's exactly the case. Throughout the years of using this forum I have learned that it is a good practice to firstly illicit from my code that part of it that is directly related to my problem and post in my question only that specific part. This way it's easier for people to understand what my problem is and it saves their time.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, hyper_, immunity, migz99, sjc1000 and 75 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