Regarding debugging:
If you are looking to optimize the timing of the firing, then the best tool for the job would probably be logging.
Download and install DebugView from SysInternals.
Then, in AHK code, you can write stuff out to debugview like this:
outputdebug % "It is currently " A_TickCount " ms since script started"
A_TickCount is probably the most important variable you are going to want to log. It is the number of ms since the script started, so it can be used to easily work out how long elapsed. ie
last_gun_fire := A_TickCount
[.. some code ..]
time_since_last_fire := A_TickCount - last_gun_fire
You might get stuff appearing for other apps in debugview, but you can filter. I prefix all UCR debug output with "UCR|".
This is the filter I use in debugview:
DBGVIEWCLEAR;UCR|*
DBGVIEWCLEAR can be sent to debugview to tell it to clear the log. UCR does this at the start of each run.
If you wish to interactively debug a plugin (ie step through the code using breakpoints etc), then this is currently not possible with the latest release of UCR. However, I am working on a method of allowing this, I may well have it ready later today or tomorrow.
If you are interested in helping forge the next generation of FC, then please do have a play with the code I posted above - I am pretty sure it is far from perfect.
The main problem is that MWO requires keys to be held for 50ms in order to recognize them. At the moment, the way I enforce this is by executing a SetKeyDelay, 0, 50 command before each fire. However, I *think* (I have not tested) that this means that sending one key will take 50ms. I have not factored this into my calculations. Also, there is only one SetKeyDelay setting for all plugins - so messing around with it is probably not the best idea.
The problem is solvable, but to be honest a big part of the problem is the Fire Sequence box - you need to pre-process what the user types in and be able to work out which keys the user means.
For example, all the following should be valid:
1,2,3,4 = 1 then 2 then 3 then 4
1,2,{Space}, {Insert} = 1 then 2 then space
1,2,{3}{4} = 1 then 2 then 3 & 4 together
So I think that the best way forward is to write some code that pre-processes the Fire Sequence box and identify which key names are used for each step.
Then, once we have those, we can easily send down or up events for those keys at appropriate intervals, without having to use SetKeyDelay.