Add AUTOTYPE to DOSBox's programs
AUTOTYPE performs scripted keyboard entry into the running DOS program. It can be used to reliably skip intros, answer Q&A style questions that some games ask on startup, or conduct a simple demo. It allows for delaying input by any number of fractional seconds, as well defining the pacing between keystrokes. It uses the comma character "," to insert additional delays similar to modern phone numbers. It uses key_* names as defined by the mapper to avoid using SDL scancodes[1], which are unstable across platforms. This approach also allows the triggering of custom key bindings the use has defined. [1] https://wiki.libsdl.org/SDL_GetScancodeName "Warning: The returned name is by design not stable across platforms, e.g. the name for SDL_SCANCODE_LGUI is "Left GUI" under Linux but "Left Windows" under Microsoft Windows, and some scancodes like SDL_SCANCODE_NONUSBACKSLASH don't have any name at all. There are even scancodes that share names, e.g. SDL_SCANCODE_RETURN and SDL_SCANCODE_RETURN2 (both called "Return"). This function is therefore unsuitable for creating a stable cross-platform two-way mapping between strings and scancodes."
This commit is contained in:
parent
ee7107470e
commit
239396fec8
11 changed files with 377 additions and 29 deletions
28
README
28
README
|
@ -1012,6 +1012,34 @@ KEYB [keyboardlayoutcode [codepage [codepagefile]]]
|
|||
keyb
|
||||
|
||||
|
||||
AUTOTYPE [-list] [-w WAIT] [-p PACE] button_1 [button_2 [...]]
|
||||
|
||||
Types the button sequence on your behalf, as if entered manually.
|
||||
|
||||
It can be used to reliably skip intros, answer Q&A style questions that
|
||||
some games ask on startup, or to script a simple demo.
|
||||
|
||||
Typing is initially delayed by the WAIT time, which defaults to 2 seconds.
|
||||
The delay between keystrokes is defined by the PACE time, which defaults
|
||||
to 0.5 seconds.
|
||||
|
||||
The comma character "," adds an extra delay similar to modern phone numbers.
|
||||
|
||||
-list: prints all available button names.
|
||||
|
||||
Examples:
|
||||
autotype -w 3 -p 0.7 up enter , right enter
|
||||
autotype -w 1.3 esc esc esc enter p l a y e r enter
|
||||
autotype -p 1 e x i t enter
|
||||
|
||||
Sample batch file for Microprose F-19 Steath Fighter:
|
||||
|
||||
autotype n 1
|
||||
f19.com
|
||||
|
||||
It types 'n' when asked if you have a joystick and '1' to select VGA mode.
|
||||
The game then proceeds to load with these settings applied.
|
||||
|
||||
|
||||
For more information use the /? command line switch with the programs.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue