Is there a way to toggle the NumLock key in a batch file?
Thanks, Dex
Printable View
Is there a way to toggle the NumLock key in a batch file?
Thanks, Dex
If you have DEBUG.EXE somewhere in your PATH, running the following MAKE-NUM.BAT will create two little utilities:
- NUMON.COM
which flips Num-Lock ON, and- NUMOFF.COM
which flips Num-Lock OFF.Code:@echo off
cls
echo Creating NUMON.COM ...
echo nnumon.com>~.scr
echo e0100 BA 40 00 8E DA A0 17 00 0C 20 A2 17 00 C3>>~.scr
echo rcx>>~.scr
echo E>>~.scr
echo w>>~.scr
echo q>>~.scr
debug<~.scr>nul
del ~.scr
dir numon.com
echo.
echo Creating NUMOFF.COM ...
echo nnumoff.com>~.scr
echo e0100 BA 40 00 8E DA A0 17 00 24 DF A2 17 00 C3>>~.scr
echo rcx>>~.scr
echo E>>~.scr
echo w>>~.scr
echo q>>~.scr
debug<~.scr>nul
del ~.scr
dir numoff.com
Thanks again Vernon. One of the few things in DOS that I've seen almost zero documentation on is the DEBUG program.
I'll have to search for some links.
Dex
Got a number of hits here: http://www.google.com/search?hl=en&i...embly+tutorial
Thanks for the Debug links. Lots of good reading.
BTW - You might get a smile out of knowing why I needed
your numoff.com command so bad. I'm basically a creature
of habit, and at work, use a laptop with DOS 6.22 on it.
The last two lines of my autoexec.bat file are now:
DOSKEY d5r=numoff$Tdir
DOSKEY c3s=numoff$Tcls
I think you probably get the signifigance of this.
A small frustration has now disappeared. ;)
Dex
:) Yep. Good to hear it worked.