Here's the example from your link
@ECHO OFF
REM Reassign F1 to list current directory
REM Reassign F10 to give DOS version
ECHO ←[0;59;"DIR/w/p";13p
ECHO ←[0;68;"VER";13p
REM Now Put a menu on the Screen in Bright Yellow
CLS
ECHO ←[1;33m
ECHO ←[12;20HF1 List Current directory
ECHO ←[14;20HF10 Print DOS Version Number
REM Reset display to normal
ECHO ←[0m
(note ← stands for the Escape character, entered using Ctrl+P then Esc inside the DOS EDIT
command or Windows command-prompt EDIT
command)
You asked
So my question is, can you send function key commands to DOS?
If the example works, yes you can. You may in fact be running Windows and not DOS, which may change things. Can you explain what happened when you tried the batch file above?
When you write "send function key commands" you might have something different in mind. If so it would be useful for you to explain what you want to achieve in a little more detail.
If so, what is the best way to do this?
I don't know, but the method in the article seems reasonable (if limited in applicability).