Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#3386493 - 09/09/11 05:06 PM REPEAT function?  
Joined: Aug 2009
Posts: 41
KaiserB Offline
Junior Member
KaiserB  Offline
Junior Member

Joined: Aug 2009
Posts: 41
Hi,

Hopefully there's an easy answer to this that I'm missing - how do you program a key to repeat as long as a button is held? I specifically mean repeatedly press and release a key (rather than just hold the key down).

I'm talking about those functions which require you to spam a key like mad, such as manual gear up and down in il2...

Inline advert (2nd and 3rd post)

#3386647 - 09/09/11 08:10 PM Re: REPEAT function? [Re: KaiserB]  
Joined: Sep 2010
Posts: 104
Dimebug Offline
Member
Dimebug  Offline
Member

Joined: Sep 2010
Posts: 104
France
under script, simply use the REXEC function(page 40 of the latest version of the manual).

example :
when i will continusly press the Joystick Hat 1 Left direction, i will send a "a" keystroke pulse (keydown then keyup) every 500 milliseconds

MapKey(&Joystick, H1L, REXEC(0, 500, "ActKey(KEYON+PULSE+'a');"));


Under the GUI, create a chain of events with the right number(or little more) of pulse needed. Press the button once (and no need to old it), and the chain will execute


Guillaume "Dimebug" Leleve
#3386693 - 09/09/11 09:01 PM Re: REPEAT function? [Re: KaiserB]  
Joined: Aug 2009
Posts: 41
KaiserB Offline
Junior Member
KaiserB  Offline
Junior Member

Joined: Aug 2009
Posts: 41
Perfect, thanks!


Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0