AutoHotkey Community

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: January 2nd, 2007, 10:37 pm 
Offline

Joined: October 17th, 2006, 2:45 am
Posts: 23
I have a program that I would like to trigger an event by holding down the 'j' key. When I hold down the key the event is triggered, when I tell autohotkey to hold it down I get the message it was ignored because it was generated by autohotkey.

I found KeyHistory so now I can see the problem, now I need a solution.... any ideas?

... here is my code

Code:
CloseAtLevels:
   KeyHistory
   Loop, 5
   {   
      Send, {vk4Asc024 down} ; Auto-repeat consists of consecutive down-events (with no up-events).
      Sleep 03 ; The number of milliseconds between keystrokes (or use SetKeyDelay).
      ; SendPlay, {9 Up}
   }
   KeyHistory
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 2nd, 2007, 10:41 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Use the $ modifier symbol.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 2nd, 2007, 11:01 pm 
Offline

Joined: October 17th, 2006, 2:45 am
Posts: 23
Where do I put the modifier in this case, I tried a few variations... none worked... in the manual, it seems the modifiers are for remaping keys. I would like to send a key just as I would if I were typing it.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 3rd, 2007, 1:42 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
qtmspin wrote:
when I tell autohotkey to hold it down I get the message it was ignored because it was generated by autohotkey.
In a game? Some games don't like being automated...

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Google Feedfetcher and 70 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