DosTips.com

A Forum all about DOS Batch
It is currently 27 Jun 2016 21:44

All times are UTC-06:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 05 Jun 2012 09:07 
Offline

Joined: 21 Nov 2010 08:07
Posts: 233
Location: At My Computer
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:


Top
   
PostPosted: 05 Jun 2012 23:40 
Online
Expert

Joined: 10 Feb 2012 02:20
Posts: 5687
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.


Top
   
PostPosted: 06 Jun 2012 03:10 
Offline

Joined: 21 Nov 2010 08:07
Posts: 233
Location: At My Computer
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)


Top
   
PostPosted: 06 Jun 2012 06:36 
Online
Expert

Joined: 10 Feb 2012 02:20
Posts: 5687
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...


Top
   
PostPosted: 06 Jun 2012 07:27 
Offline

Joined: 21 Nov 2010 08:07
Posts: 233
Location: At My Computer
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.


Top
   
PostPosted: 07 Jun 2012 14:45 
Offline
Expert

Joined: 16 May 2011 08:21
Posts: 1433
Location: Flanders(Belgium)
'
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.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 7 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® Forum Software © phpBB Limited