WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Launching WinBatch and Other Apps
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Launch Accessibility Properties and Check to See is MouseKey is On

Keywords: 	 mousekey accessibility properties numpad numeric keypad

Question:

Is there anyway that I can get WinBatch to recognize that MouseKey is on and that pressing the numberpad key 6 (for example) should move the mouse pointer to the right one pixel?

Answer:

I created a sample script to launch "Accessibility Properties" and then check to see if the checkbox is checked. This script was created in Win98, so you may need to modify it for other versions of Windows.

Then to sendkeys using the Numeric Keypad area of the keyboard, you will need at least version 98A of Winbatch.

;===============cut===========================
AddExtender("wwctl34I.dll")

Run("rundll32.exe", "shell32.dll,Control_RunDLL ACCESS.CPL")

title="Accessibility Properties"
multiwnd=DllHwnd(title)
tabtitle="Mouse"
systabwnd=cWndByClass(multiwnd,"SysTabControl32")
cSetTabItem(systabwnd,4)

mousewnd=cWndByName(multiwnd,"Mouse")
prefchkbox=cWndByname(mousewnd,"Use MouseKeys")
chk=cCheckbox(prefchkbox,-1)


if chk==1 
   Message("MouseKeys", "MouseKeys is enabled")
else
   Message("MouseKeys", "MouseKeys is NOT enabled")
endif
Starting with version 98A of Winbatch, added additional special characters to the SendKey (and SendKeysTo and SendKeysChild) functions:
    Key                      SendKey equivalent
    ---                      ------------------
    0 on numeric keypad      {NUMPAD0}
    1 on numeric keypad      {NUMPAD1}
    2 on numeric keypad      {NUMPAD2}
    3 on numeric keypad      {NUMPAD3}
    4 on numeric keypad      {NUMPAD4}
    5 on numeric keypad      {NUMPAD5}
    6 on numeric keypad      {NUMPAD6}
    7 on numeric keypad      {NUMPAD7}
    8 on numeric keypad      {NUMPAD8}
    9 on numeric keypad      {NUMPAD9}
    * on numeric keypad      {NUMPAD*}
    + on numeric keypad      {NUMPAD+}
    - on numeric keypad      {NUMPAD-}
    . on numeric keypad      {NUMPAD.}
    / on numeric keypad      {NUMPAD/}
    Enter on numeric keypad  {NUMPAD~}  (32-bit only)
 

Article ID:   W13268
Filename:   Launch Accessibility Props Check if MouseKey is On.txt
File Created: 2001:03:01:14:33:54
Last Updated: 2001:03:01:14:33:54