Help with Virtual Key Codes

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
E Coli

Help with Virtual Key Codes

Post by E Coli » Thu May 29, 2003 6:04 pm

Hi all,

First, let me say that Macro Scheduler rocks! I'm having a bit of trouble right now that I can't seem to find a way around.

I'd like to remap my keyboard, so that when I press the left CTRL button (manually) and press J, I, K, or L (manually), it would actually send ARROW LEFT, ARROW UP, ARROW DOWN, and ARROW RIGHT (in that order). I was going to use WaitKeyDown for CTRL, then WaitKeyDown for the other keys, then send the appropriate keystroke using Macro Scheduler. However, I've run into a snag.

So far, the idea works with any keys other that my Control, Shift or Alt keys. For my left Control, I've tried both virtual codes 17 and 162, but neither one seems to be "seen" by Macro Scheduler. My operating system is Windows NT. The basic concept works with other ordinary alpha keys. However, I can't seem to get Macro Scheduler to recognize that I've pressed the CTRL, ALT, or SHIFT keys. I suspect that I'm not using the right Virtual Key Code, but I can't find any other ones. The ones I'm using are decimal, not Hex.

Does anyone out there have any ideas?

Thanks in advance.
Eric

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sat May 31, 2003 8:28 am

Hi,

It would be much easier to just use hotkey macros.

Make the macro to send the arrow keys:

Press Left
Press Up
Press Down
Press Right

Call this something 'ArrowMacro'

Now make macros for each key mapping:

Macro: CTRL-J

Macro>ArrowMacro.scp

And in the hotkey settings of macro properties set this to run when CTRL-J is pressed.

Make another macro like this for CTRL-I

etc etc
MJT Net Support
[email protected]

E Coli

Post by E Coli » Sat May 31, 2003 2:17 pm

Thanks for the help! One of the things I like about this software is it is so simple to use. Sometimes the solutions are so obvious, I automatically try to make things more difficult than they need to be.

Thanks!

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