Need help with a script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Redivh
Posts: 17
Joined: 17 Oct 2021, 17:56

Need help with a script

Post by Redivh » 17 Oct 2021, 18:09

I'm trying to make it so that every time I press Numpad 0 there is a 0.5 second pause and then Numpad Enter gets pressed. How do I do this?

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: Need help with a script

Post by mikeyww » 17 Oct 2021, 18:18

Code: Select all

Numpad0::
Sleep, 500
Send {NumpadEnter}
Return

Redivh
Posts: 17
Joined: 17 Oct 2021, 17:56

Re: Need help with a script

Post by Redivh » 17 Oct 2021, 18:31

Thanks, I also want to remap the A key with Numpad 0, can I do this at the beginning of the same script? If so, how do I do that?

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: Need help with a script

Post by mikeyww » 17 Oct 2021, 18:53

What should happen when you press what key?

Redivh
Posts: 17
Joined: 17 Oct 2021, 17:56

Re: Need help with a script

Post by Redivh » 17 Oct 2021, 20:35

When I press (A) I want (Numpad 0) to be pressed then wait 0.5 seconds then (Numpad 5) needs to be pressed. This all needs to happen each time I press (A).

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: Need help with a script

Post by mikeyww » 17 Oct 2021, 21:05

Code: Select all

$Numpad0::
Sleep, 500
Send {NumpadEnter}
Return

a::
Send {Numpad0}
Sleep, 500
Send {Numpad5}
Return

Redivh
Posts: 17
Joined: 17 Oct 2021, 17:56

Re: Need help with a script

Post by Redivh » 17 Oct 2021, 22:26

Ok Thanks!

Post Reply

Return to “Ask for Help (v1)”