Multilined Hotstring using ClipBoard Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
slyfox1186
Posts: 53
Joined: 28 Oct 2018, 23:56

Multilined Hotstring using ClipBoard

26 Sep 2021, 21:01

Hey guys I am having a problem getting my hotstring to work as intended.

My issue is the last line of text has a tab placed at the beginning of the line before the text.

In my example below I am using HOTSTRINGS as the current windows clipboard contents.

This is what I am currently getting ... I can't figure out how to add a `t character to the beginning of a line so I used TAB HERE in its place:

Code: Select all

/*____________________________________________________________________________________
TAB HEREHOTSTRINGS
TAB HERE*/
This is what it should look like:

Code: Select all

/*____________________________________________________________________________________
TAB HEREHOTSTRINGS
*/
Here is my script so far:

Code: Select all

:OT:test::
	KeyWait, a
	SendInput, `/`*____________________________________________________________________________________
	SendInput, `r`n
	SendInput,`t%ClipBoard%
	SendInput, `r`n
	SendInput, `*`/
Return
Any ideas why the TAB is carrying over to the third line from the second?
User avatar
boiler
Posts: 16926
Joined: 21 Dec 2014, 02:44

Re: Multilined Hotstring using ClipBoard  Topic is solved

26 Sep 2021, 21:53

It’s probably because your editor is automatically tabbing over following a line that is tabbed over as it would do when you manually use it. Most editors made for coding do that.
User avatar
slyfox1186
Posts: 53
Joined: 28 Oct 2018, 23:56

Re: Multilined Hotstring using ClipBoard

26 Sep 2021, 22:15

I use Notepad++ and as soon as I disabled the options "Auto Indent" in the settings the issue cleared up.

Thanks for reminding me this was a possibility.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Rohwedder and 386 guests