PgDn

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
gazac48
Posts: 2
Joined: 06 Jun 2023, 00:09

PgDn

Post by gazac48 » 06 Jun 2023, 00:21

Hi all have just joined
I have done some scripts & they work well, but this one got me stumped
I want to press PgDn (Page Down) to add _1 to the end of a file name, so far this is what I have tried

Code: Select all

PgDn::
send {_1}
return
Thank you


[Mod action: Moved topic to v1 section since this is v1 code. The main section is for v2.]

User avatar
boiler
Posts: 16949
Joined: 21 Dec 2014, 02:44

Re: PgDn

Post by boiler » 06 Jun 2023, 01:19

Braces are for enclosing key names, not text to be sent. Try this:

Code: Select all

PgDn::Send, _1

Note that single-line hotkey routines can be on the same line as the hotkey label, in which case you wouldn’t add a return.

On a separate subject, when you were about to post, did you not see the popup asking you if you were using v2 because you were about to post in the v2 section, or did you not realize you are not using v2?

gazac48
Posts: 2
Joined: 06 Jun 2023, 00:09

Re: PgDn

Post by gazac48 » 06 Jun 2023, 09:14

Think you, I was using ver 1, but have downloaded v2, is the code you showed me the same for v2
Last edited by gregster on 06 Jun 2023, 11:39, edited 1 time in total.
Reason: Moved topic to v2 help and removed duplicate topic.

gregster
Posts: 9012
Joined: 30 Sep 2013, 06:48

Re: PgDn

Post by gregster » 06 Jun 2023, 11:44

gazac48 wrote:
06 Jun 2023, 09:14
Think you, I was using ver 1, but have downloaded v2, is the code you showed me the same for v2
In v2, try

Code: Select all

PgDn::Send "_1"

Post Reply

Return to “Ask for Help (v2)”