copy() and paste() - newline

Post Reply
dzordzyk
Posts: 1
Joined: Thu Aug 18, 2016 8:24 pm

copy() and paste() - newline

Post by dzordzyk »

Hi,

I'm trying to get copy() and paste() working, but I'm experiencing problems with newline. In other topic on the forum I found that to not select the new line before copy(), I should use selectString(line, 1), so that's what I'm using. My code in the trigger is:
Code: [show] | [select all] lua
selectString(line, 1)
copy()
local str_replace = "[2/6] "
replace(str_replace)
paste("main")
However, for some reason, there is an extra newline. Image The reason I'm using copy/paste is because I want to preserve the original coloring from the MUD. Can anyone help here?

Thanks!

Moderator Edit: brought screen shot image into post... :)

Post Reply