clipboard including cursor position Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
paik1002
Posts: 355
Joined: 28 Nov 2015, 02:45

clipboard including cursor position

16 Oct 2018, 01:23

Is it possible to include the cursor position in the content of the clipboard?

Code: Select all

clipboard := "hello there how are you doing?" {Left 1}     ; place cursor between g and ?
sendinput ^v
User avatar
TheDewd
Posts: 1510
Joined: 19 Dec 2013, 11:16
Location: USA

Re: clipboard including cursor position  Topic is solved

16 Oct 2018, 07:53

Code: Select all

#SingleInstance, Force

Clipboard := "hello there how are you doing?{Left 1}"

RegExMatch(Clipboard, "(.*)({.*})", Contents)

Clipboard := Contents1

SendInput, ^v

SendInput, % Contents2
paik1002
Posts: 355
Joined: 28 Nov 2015, 02:45

Re: clipboard including cursor position

24 Oct 2018, 02:30

I don't know how this regex works, but it does the trick. Thank you!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: RussF and 362 guests