user16777176
user16777176

Reputation:

AHK write characters automatically and set cursor between these 2 characters

I installed ahk yesterday so I don't know very much how to use it. I want to create a script that writes characters. exemple:

I press < and it automatically puts > at the end and sets the cursor between < and >

I searched for about 30 minutes how to do this, but none of the answers were working.

Upvotes: 0

Views: 201

Answers (2)

skygate
skygate

Reputation: 373

Hotstring version (recommended):

:*?:<::<>{Left}

Hotkey version:

~<::Send >{Left}

or

$<::Send <>{Left}

Upvotes: 1

kennysliding
kennysliding

Reputation: 2967

It can be done with remapping < to

<::Send {<}{>}{Left}

When you type <, you will be typing <, >, then press the left arrow key.

Upvotes: 0

Related Questions