Rasmothius
11th April 2006, 05:37 PM
hi everybody.my first post as im a newbie.im a flight sim guy at heart but lately have been playing alot of warcraft.i have a different control setup than most.i use my pro throttle for forward movement on throttle axis and have some some lateral movement and spell keys programmed into hat switches.i use the mouse as normal for right hand.my question is how would i program 1 hat switch to send mutiple key presses[up to 5]on different delays??e.g.-action button 6 in game- iwant to throw fireball have a delay of 2 seconds throw second fireball wait another 2 seconds etc.keep in mind im a newbie as far as programming goes-over the years just have done basic macros-no scripts.if anybody can help me i would sure appreciate it -thanks
MichaelCHProd
11th April 2006, 09:19 PM
I think you are going to need to use a script. Most likely a "Delay" script. Here is a cut from the Users Guide...
// Wait until Button 4 on JS1 is pressed, then flash Button 1 on the
// CMS Controls 2 times.
//
SEQUENCE
WAIT( JS1.B4 ); // Wait for the JS1 button to get pressed
CMS.B1 = TRUE; // Turn on the CMS button
DELAY( 10 ); // Wait about half a second
CMS.B1 = FALSE; // Turn off the CMS button
DELAY( 10 ); // Wait about half a second
CMS.B1 = TRUE; // Turn on the CMS button
DELAY( 10 ); // Wait about half a second
CMS.B1 = FALSE; // Turn off the CMS Button
ENDSEQUENCE
DonULFonso
11th April 2006, 10:13 PM
Welcome :cheers: to The Hangar, Rasmothius :salute: !
Unfortunately, Michael is right: you will need a script to time such a sequence. The normal GUI allows to pause a bit between keystrokes, but only in terms of character times (AKA typematic rate). The default setting is 50ms, so to get a total pause of 2s you'd need a looong line...
But there's an easier way to script a key or button being pressed and released each 2s as long as it's being held depressed, supposed it's the very same key/button you want to generate (the SEQUENCE of above is perfect to generate a sequence of different keystrokes/DX-buttons):
TIMER ( INTERVAL, D1, 2, 38 ) = JS1.B4;
CMS.B1 = D1;
This sets up a TIMER Device-variable 1 that's flashing in INTERVALs of 2 character-times "on" followed by 38 character-times "off", i.e. 2*50=100ms=0.1s "on" then 38*50=1,900ms=1.9s "off", i.e. at a frequency of once each 2s, as long as Button 4 on the JoyStick 1 is being held depressed.
Instead of assigning the needed output directly to the physical Button 4 on the JoyStick 1 (which would result in one instance getting generated each time it is pressed), the output is assigned to the logical Button 1 on the Control Manager Scripting Controls tab of the GUI.
Hope this makes sense (if not: that's normal ;) ).
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.