VOGONS

Common searches


First post, by michaelmak

User metadata
Rank Newbie
Rank
Newbie

Hi all,

When I play the Xenon2 games, I need to press and release the space bar repeatedly to shoot the enemies.
How can I make the space bar become an auto fire key by keyboard mapper ?

Thanks.

Michael

Reply 2 of 7, by michaelmak

User metadata
Rank Newbie
Rank
Newbie

Hi Zirkoni,

I have already read that forums before I post this question here.
But I still don't understand how to create the autofire key.
It seems that I need to write some program code to achieve my aim.

Reply 3 of 7, by zirkoni

User metadata
Rank Member
Rank
Member

AutoHotkey is a program you install on you Windows PC: https://www.autohotkey.com/
It uses it's own script language to perform key mappings and other actions and can be used to do some quite complex tasks.

Fo Xenon 2 autofire the script I posted at Abandonia is enough:

$Space::
While GetKeyState("Space","p"){
Send {Space}
Sleep 10
}
return

Save that text in an AutoHotkey script (e.g. autofire.ahk) and run it with AutoHotkey. While the script is active keeping spacebar pressed fires once every 10 ms.

https://youtube.com/@zirkoni42

Reply 5 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You run Autohotkey in the background and you can set it to only run this script when Dosbox runs. It can probably even configured to only run when you play the game in Dosbox as Dosbox' titlebar shows that and Autohotkey can check for this.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 6 of 7, by michaelmak

User metadata
Rank Newbie
Rank
Newbie

Hi Dominus,

Thank you for your reply.

I guess that you mean I need to write a BAT file to start both DOSBox and Autohotkey.
Then I need to kill the Autohotkey process from Task Manager when I exit from the DOSBox.
I will study how to do it.

Reply 7 of 7, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

You can do all that with autohotkey. Start the script with dosbox (or rather a script converted to exe can start dosbox), exit when you exit Dosbox.
But my Autohotkey is rusty, seven years ago I switched to OS X but before I used Autohotkey for something like that.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper