#121250 - 2004-06-15 11:08 PM
Re: What is NumLock key status?
|
jpeachman
Fresh Scripter
Registered: 2002-11-18
Posts: 39
|
Not a real elegant solution, but could you use SendKeys() to echo a number to a temp file, then read that file? With suitable error checking to be sure the file was created properly, if you then read the file's contents and it is the number you sent, your NumLock state is OK; otherwise SendKeys("{NUMLOCK}"). You could even restore the NumLock state after your commands if you had to change it and you want to be nice 
Joe
|
|
Top
|
|
|
|
#121254 - 2004-06-16 07:08 PM
Re: What is NumLock key status?
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11631
Loc: CA
|
AutoIt Home Page http://www.autoitscript.com/autoit3/
Quote:
Introduction AutoIt v3 is an opensource BASIC-like scripting language designed for automating the Windows GUI. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys).
AutoIt was initially designed for PC "roll out" situations to configure thousands of PCs, but with the arrival of v3 it is also well suited to performing home automation and the scripting of repetitive tasks.
AutoIt can:
Provide a general-purpose scripting language Execute Windows and DOS executables Simulate key-strokes (supports most keyboard layouts) Simulate mouse movements and clicks Move, resize and manipulate windows Interact directly with "controls" on a window (set/get text from edit controls, check boxes and radio buttons, select items in drop-down lists, etc.) Work with the clipboard to cut/paste text items Work with the registry
|
|
Top
|
|
|
|
#121257 - 2004-06-17 07:29 PM
Re: What is NumLock key status?
|
jpeachman
Fresh Scripter
Registered: 2002-11-18
Posts: 39
|
OK...except it doesn't answer your original question about getting the NumLock status! The only reason for wanting to know that I can think of would be to return it to how it was before the script ran, to avoid annoying/confusing your users (which I tried to allude to in my response above). If you don't care about that, then you probably don't need to know the original status, and this solution is fine!
Joe
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1782 anonymous users online.
|
|
|