How can I make in line backticks? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

How can I make in line backticks?

Post by LAPIII » 25 Mar 2022, 13:21

I want to write `` and put the insertion cursor in the middle. AutoHotkey scripts don't seem to use backtick well.

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

Re: How can I make in line backticks?

Post by mikeyww » 25 Mar 2022, 13:26

Code: Select all

Send ````{Left}

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: How can I make in line backticks?

Post by LAPIII » 25 Mar 2022, 13:28

Terrific can I map this to a single `? I was able to assign it to^`:

Code: Select all

^`::Send ````{Left}

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

Re: How can I make in line backticks?

Post by mikeyww » 25 Mar 2022, 14:43

Code: Select all

~`::Send ``{Left}

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: How can I make in line backticks?

Post by LAPIII » 17 May 2022, 21:52

Sometimes when I press ` then the second backtick prints and it goes back one space. Please correct this:

Code: Select all

~`::
Send `
Sleep 100
Send `{Left}
return

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

Re: How can I make in line backticks?

Post by mikeyww » 18 May 2022, 05:05

That's what the script does:
I want to write `` and put the insertion cursor in the middle.

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: How can I make in line backticks?  Topic is solved

Post by LAPIII » 18 May 2022, 10:06

@mikeyww With which, my script or yours? My script only makes a ` and goes backwards one space. With your script, it's only sometimes.

EDIT: Fixed

Code: Select all

~`::
Send ``
Send {Left}
return

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

Re: How can I make in line backticks?

Post by mikeyww » 18 May 2022, 10:18

OK. It looks like you have replicated what I already posted.

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: How can I make in line backticks?

Post by LAPIII » 18 May 2022, 10:29

I don't know why your script sometimes didn't work. I figure my solution will always work because by default there is a 10 ms delay per line.

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

Re: How can I make in line backticks?

Post by mikeyww » 18 May 2022, 10:53

I believe that you are mistaken. The key delay occurs for every key. In terms of lines:
The script will sleep for 10ms every time it has run for 20ms

LAPIII
Posts: 667
Joined: 01 Aug 2021, 06:01

Re: How can I make in line backticks?

Post by LAPIII » 18 May 2022, 11:03

Thank you for correcting me, I guess I was thinking of SetBatchLines, 10ms, btw how long would a delay be if I use SetBatchLines, 1. I think to solve my problem I should just add a delay before the first `.
Last edited by LAPIII on 18 May 2022, 11:16, edited 1 time in total.

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

Re: How can I make in line backticks?

Post by mikeyww » 18 May 2022, 11:14

Sure, if that works.

See: SetBatchLines

Post Reply

Return to “Ask for Help (v1)”