I am trying to script a sequence of key presses ("taps") while in menu mode.
I have tried the MenuTapKey fose command, but it does not seem to work
for other keys than "escape" or "tab". In particular, I am trying to emulate
"down arrow" and "enter" key taps.
I have tried queuing the commands:
- directly
- by putting a timer to delay the key taps and
- by using doonce scripting to do a key tap per script run.
I am using a quest script.
Here is my code:
Spoiler
ScriptName aaaaSLA
short i
float timer
int controlDo
Begin menumode
set timer to 0
set i to 0
if ControlDo == 1
set i to 1
elseif ControlDo == 2
set i to 2
elseif ControlDo == 3
set i to 3
elseif ControlDo == 4
set i to 4
elseif ControlDo == 5
set i to 5
elseif ControlDo == 6
set i to 6
endif
if i == 0
MenuTapKey 208
set ControlDo to 1
showMessage tmsg1
elseif i == 1
MenuTapKey 208
set ControlDo to 2
showMessage tmsg2
elseif i == 2
MenuTapKey 208
set ControlDo to 3
showMessage tmsg3
elseif i == 3
MenuTapKey 28
set ControlDo to 4
showMessage tmsg4
elseif i == 4
MenuTapKey 28
set ControlDo to 5
showMessage tmsg5
elseif i == 5
MenuTapKey 28
set ControlDo to 6
showMessage tmsg6
endif
end
short i
float timer
int controlDo
Begin menumode
set timer to 0
set i to 0
if ControlDo == 1
set i to 1
elseif ControlDo == 2
set i to 2
elseif ControlDo == 3
set i to 3
elseif ControlDo == 4
set i to 4
elseif ControlDo == 5
set i to 5
elseif ControlDo == 6
set i to 6
endif
if i == 0
MenuTapKey 208
set ControlDo to 1
showMessage tmsg1
elseif i == 1
MenuTapKey 208
set ControlDo to 2
showMessage tmsg2
elseif i == 2
MenuTapKey 208
set ControlDo to 3
showMessage tmsg3
elseif i == 3
MenuTapKey 28
set ControlDo to 4
showMessage tmsg4
elseif i == 4
MenuTapKey 28
set ControlDo to 5
showMessage tmsg5
elseif i == 5
MenuTapKey 28
set ControlDo to 6
showMessage tmsg6
endif
end
The point is to eventually script a sequence of key presses to go to
the main menu and load from there, thus avoiding the buggy quickload.
Any pointers would be great!