Argh, this is confusing!

Ask gaming related questions
BSWearden
Posts: 1
Joined: 03 Jan 2018, 17:38

Argh, this is confusing!

03 Jan 2018, 17:43

I've been trawling through the AHK tutorials for a solid 2 hours now attempting to create a simple script to no avail.
I'm trying to create a script that when you press a key on the number pad, it mimics the key on the number pad above the qwerty line.

So, if I pressed Numpad 1, the computer would believe that I press 1 on the row of numbers and so forth.

I thought that the script would be something like this;

Numpad1::
Send, 1
Return

Numpad2::
Send, 2
Return

Numpad3::
Send, 3
Return

Numpad4::
Send, 4
Return

But no, I am completely failing.

Please could some kind soul impart a bit of wisdom and set me in the right direction!?

Thank you,
Ben
nadjibSoft
Posts: 9
Joined: 29 Dec 2017, 14:57
Facebook: 100011403841640

Re: Argh, this is confusing!

03 Jan 2018, 17:56

Key board recording ?
nadjibSoft
Posts: 9
Joined: 29 Dec 2017, 14:57
Facebook: 100011403841640

Re: Argh, this is confusing!

03 Jan 2018, 18:03

Numpad1::
Send, {Numpad1}
Return

BUT HERE there is an infinite loop, cause; when you send {Numpad1}, this call the hotkey Numpad1 and so on!... to fix this problem write...
numpad1::
hotkey, numpad1, off
send, {numpad1}
hotkey, numpad1, on
return

and the same thing for other numbers
gregster
Posts: 4203
Joined: 30 Sep 2013, 06:48

Re: Argh, this is confusing!

03 Jan 2018, 18:23

Najibsoft, I think he really wants to remap the numpad keys to the regular number keys, so your proposal won't work for him.
A regular remap could look like this:

Code: Select all

Numpad1::1
I guess, there might be some games that don't respect those remappings. For elevated programs you might have to run your script as admin. (Sending 1 should work, too, in most cases.)
What exactly is not working? Doesn't it work in notepad? Or other programs (which?)?
Of course, Numpad1 won't work, if your Numlock is in the wrong position (that would be 'off'). In this case, refer to the docs for the correct key names (see https://autohotkey.com/docs/KeyList.htm#Numpad_keys)

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 35 guests