If you can not get that working I may look for another way to do that for you, maybe joy2keys.
EDIT:-
jtk374en.7z
Joy2keys lets you assign keyboard keys to your joypad, handy for games and emulators that do not support joypads directly (including games ran through DosBox) anyway for this you can setup joypad X to a keyboard key and set Automatic shooting to max that is 30, that is the exact same this as autofire, just hold down the button and it will autofire constantly, 30 is just the speed not the amount of repeats, you only need to do that with the button you want and leave the rest blank, text in notepad or something to make sure the correct button to on autofire.
Make sure you pad is plugged in before running this