Luis Diaz
asked on
AutoHotkey: Add specific character at the beginning of each line
Hello experts,
The following script allows me to add a specific character at the beginning and end of a selected text:
I would like to take it as a reference to add specific character (-) at the beginning of the various lines of a selected text.
Example of a selected text:
Line 1
Line 2
Line 3
Line 4
Result:
-Line 1
-Line 2
-Line 3
-Line 4
If you have questions, please contact me.
Thank you for your help.
The following script allows me to add a specific character at the beginning and end of a selected text:
;====================================
;EE Code
;====================================
!^c:: ;code
Send, ^c
Sleep, 50
ClipWait,1
If (ErrorLevel=1)
{
MsgBox,4144,Error, No text appearing after one second
Return
}
ClipboardVar:=Clipboard
Clipboard:="[code(string))]" . ClipboardVar . "[/code(string)]"
Sleep, 50
MsgBox,4160,Success,Your clipboard has been properly copied., 2
Return
I would like to take it as a reference to add specific character (-) at the beginning of the various lines of a selected text.
Example of a selected text:
Line 1
Line 2
Line 3
Line 4
Result:
-Line 1
-Line 2
-Line 3
-Line 4
If you have questions, please contact me.
Thank you for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Joe,
I tested and it works!
Thank you very much for your help!
I tested and it works!
Thank you very much for your help!
You're welcome, Luis, and thanks to you for letting me know that it works. Thanks, too, for writing the very nice Testimonial...I really appreciate it! Regards, Joe
ASKER
I modify the question to have a proper code comment.
I will test your proposal and keep you informed.