Use Virtual Key Codes for Press and/or Send?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
twwilliams
Newbie
Posts: 5
Joined: Mon Dec 30, 2002 10:33 pm

Use Virtual Key Codes for Press and/or Send?

Post by twwilliams » Mon Dec 30, 2002 10:38 pm

Is there a way to use Virtual Key Codes as a modifier for Press and/or Send?

I would like to be able to "Press" some of the Windows 2000/XP keys like VK_VOLUME_MUTE or VK_LAUNCH_MAIL, for example.

See the list at:

http://msdn.microsoft.com/library/defau ... yCodes.asp

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Mon Dec 30, 2002 11:09 pm

Hi twwilliams,

As far as the special function buttons (eg, sound mute, email launch, DVD Play,...etc.) are concerned, I suppose the keyboard scan codes or virtual key codes depends on the drivers.

Happy New Year.

twwilliams
Newbie
Posts: 5
Joined: Mon Dec 30, 2002 10:33 pm

Post by twwilliams » Mon Dec 30, 2002 11:14 pm

I understand that it depends on the Microsoft driver software installed. My problem is that I don't have a keyboard with these keys on them (I use a special ergonomic keyboard). I do have a 58-key programmable keypad, though, and would like to assign these to it. I would also like to include some of these special keys in a sequence of functions.

So I need some way for a tool, such as Macro Scheduler, to generate these key codes.

If this isn't possible, I could probably borrow one of the Microsoft multimedia keyboards long enough to map the codes onto my programmable keypad.

-- Tommy

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Tue Dec 31, 2002 12:47 am

Hi Tommy,

You don't need a keyboard to generate the regular scan codes. The primary function of Macro Scheduler is to simulate keystrokes. Just create a sample Macro Scheduler script with the following statements:

run>c:\windows\notepad.exe
Sen>Happy New Year!

// You may close the Notepad window:
Press ALT
Press F4

// You may shut down you PC under Windows XP
Presss RWinkey
Sen>UU

Hope you find the above sample script helpful.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts