View unanswered posts | View active topics It is currently 27 Aug 2014 14:58



Post new topic Reply to topic  [ 6 posts ] 
[help]Batch Script to Toggle Numlock? 
Author Message

Joined: 21 Nov 2010 08:07
Posts: 215
Location: At My Computer
Post [help]Batch Script to Toggle Numlock?
Calling all Dos Guru's!!

Am using Windows 7 and need the ability to toggle the {NUMLOCK} on and off from the commandline via batch.
I know there are .vbs scripts, 3rd party apps and possible registry entries
that will do this but would Perfer doing this via a batch file.The only documentation I could find was a Microsoft support site at: http://support.microsoft.com/kb/151715
but this uses a 16-bit debug.com file that W7 does not support.

Thanks again for your help in this..

Dos_Probie :shock:


05 Jun 2012 09:07
Profile

Joined: 10 Feb 2012 02:20
Posts: 4102
Post Re: [help]Batch Script to Toggle Numlock?
Dos_Probie wrote:
I know there are .vbs scripts, 3rd party apps and possible registry entries
that will do this but would Perfer doing this via a batch file.


What is wrong with using a third party tool or scripts or registry entries?
How do you think a batch file is doing to do it?

There are no native batch commands to do this - possibly a debug script can do it but then you are still using scripts.


05 Jun 2012 23:40
Profile

Joined: 21 Nov 2010 08:07
Posts: 215
Location: At My Computer
Post Re: [help]Batch Script to Toggle Numlock?
Quote:
There are no native batch commands to do this - possibly a debug script can do it but then you are still using scripts.


Good answer Foxi..I came to the same conclusion, that dos by itself can't do the keystrokes natively, but since
this is a Dos forum I wanted to use dos as much as possible without relying on other methods. I personally like to
do as much "hands free" as possible and dos seems to allow that over the other methods.The 3rd party apps usually
require user interaction and mouse clicks unless I use AutoIt, Vbs is great but if there is an error it will
stall out on you waiting for a response unlike dos that is more forgiving and registry hacks work but I perfer using reg add and reg delete
when possible via commandline. Finally someone on here has a Helpful answer without the sarcasm like some other members.

Thanks, again
Dos_Probie 8)


06 Jun 2012 03:10
Profile

Joined: 10 Feb 2012 02:20
Posts: 4102
Post Re: [help]Batch Script to Toggle Numlock?
The point about VBS scripts is not valid, as you will presumably be running a script that is tested and will never fail.

We *do* aim for command line options here and not gui programs unless you need to get input - when you can opt for several styles of getting input.
So don't knock a VBS script if someone offers you one that solves your task...


06 Jun 2012 06:36
Profile

Joined: 21 Nov 2010 08:07
Posts: 215
Location: At My Computer
Post Re: [help]Batch Script to Toggle Numlock?
Quote:
The point about VBS scripts is not valid


Point taken, I Do use .vbs a lot and ALWAYS fully test before I go Live, but what I should HAVE said is if for example the .vbs is dependent on another .exe file to install so it can do its job and for whatever reason the .exe does not then the .vbs will stall out with a line code etc and will fail as with dos it will contintue to run and complete.


06 Jun 2012 07:27
Profile
Expert

Joined: 16 May 2011 08:21
Posts: 1261
Location: Flanders_(Belgium)
Post Re: [help]Batch Script to Toggle Numlock?
'
STACKEY, a utility from the makers of CTRLALT, will automatically place keystrokes in your keyboard buffer. It is intended for use in connection with BATch files.

You can stack any function key or legal Alt-key combination; you can even stack today's date or the current directory name. You can stack commands to turn the Num Lock state on and off. You can stack commands to set colors on the CGA and remap colors on the EGA or VGA. You can stack a PrtSc. You can stack commands to call up SIDEKICK, SIDEKICK PLUS or any other program that pops up on pairs of shifts. You can invoke CTRLALT PLUS, CAROUSEL or DESQVIEW. STACKEY has numerous methods for controlling the flow of a STACKEY "script". You can put delays in or have STACKEY delay its playback until a given message appears on the screen or you can have script playback pause until you hit a key. You can pause playback and later restart it with appropriate hotkeys and even flush STACKEY's buffer that way. STACKEY scripts can even branch depending on what hot key is hit or what message appears on the screen.


07 Jun 2012 14:45
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forums/DivisionCore.