Search found 1154 matches

by Jor'Mox
Wed Jun 05, 2013 6:02 pm
Forum: Help Forum
Topic: Rewrapping text in a miniconsole
Replies: 25
Views: 19955

Re: Rewrapping text in a miniconsole

I just created and ran an example script as follows:
local name = "testbuffer"
createBuffer(name)
echo(name,"1\n" .. "2\n" .. "3\n" .. "4\n" .. "5\n" .. "testing\n")
moveCursor(name,0,0)
display(getCurrentLine(name)) -- "1"
moveCursor(name,0,4)
display(getCurrentLine(name)) -- "5"
display ...
by Jor'Mox
Wed Jun 05, 2013 5:53 pm
Forum: Help Forum
Topic: Rewrapping text in a miniconsole
Replies: 25
Views: 19955

Re: Rewrapping text in a miniconsole

So, I double checked, and it was just not refreshing the display on the miniconsole after I changed the text, so that is why I was thinking something was odd with the select functions.

However, I also double checked, and calling getLineCount for my miniconsole windows and the buffers I'm using to ...
by Jor'Mox
Wed Jun 05, 2013 2:44 pm
Forum: Help Forum
Topic: Rewrapping text in a miniconsole
Replies: 25
Views: 19955

Re: Rewrapping text in a miniconsole

So, just so I'm clear about things, the select functions just target whatever cursor you moved most recently, yes? I think it could be nice if you could specify a window with them, but I can at least live with that.

As I am often coding things for others, is there any way to fix the replace issue ...
by Jor'Mox
Tue Jun 04, 2013 7:55 pm
Forum: Help Forum
Topic: Rewrapping text in a miniconsole
Replies: 25
Views: 19955

Re: Rewrapping text in a miniconsole

Well, I am actually using a buffer for what I did. But, while I can see that some of the functions work well with buffers, I guess I'm not seeing (in the help or in the wiki) how you would use selectString with one, or other functions like getLineNumber.

Mostly, I seem to be able to getCurrentLine ...
by Jor'Mox
Tue Jun 04, 2013 5:33 pm
Forum: Help Forum
Topic: Rewrapping text in a miniconsole
Replies: 25
Views: 19955

Re: Rewrapping text in a miniconsole

By the way, is there any chance we will ever have a way to have access to text in rich text format? I.E. I know we can use copy/paste/appendBuffer to grab things with formatting, but at no point is the text used accessible to let it be edited or interacted with. Even putting copied text into some ...
by Jor'Mox
Tue Jun 04, 2013 4:24 pm
Forum: Help Forum
Topic: Rewrapping text in a miniconsole
Replies: 25
Views: 19955

Re: Rewrapping text in a miniconsole

Never mind, fixed it. For those that might be interested, this is what I did:

line = 1
clearWindow(window)
moved = moveCursor(buffer,1,line)
while moved do
text = getCurrentLine(buffer)
line = line + 1
moved = moveCursor(buffer,1,line)
if moved then text = text .. "\n" end
cecho(window,text ...
by Jor'Mox
Tue Jun 04, 2013 3:17 pm
Forum: Help Forum
Topic: Rewrapping text in a miniconsole
Replies: 25
Views: 19955

Re: Rewrapping text in a miniconsole

Also, while this works for when the miniconsole is made smaller, it obviously doesn't unwrap lines when it is made larger. Any ideas on how to achieve that?
by Jor'Mox
Tue Jun 04, 2013 3:07 pm
Forum: Help Forum
Topic: Rewrapping text in a miniconsole
Replies: 25
Views: 19955

Rewrapping text in a miniconsole

So, I want to rewrap the text in my miniconsoles when they are resized. Currently, my only real strategy is to use moveCursor to move it to the top, then step through each line and rewrap that line, if moveCursor fails, I stop my script (because I reached the end). Any ideas for a better way to do ...
by Jor'Mox
Mon Jun 03, 2013 12:25 am
Forum: Help Forum
Topic: Problems with simple database
Replies: 3
Views: 3173

Re: Problems with simple database

I use these:
http://wiki.mudlet.org/w/Manual:Lua_Functions
http://pgl.yoyo.org/luai/i/_

Also, the existing table.update function is broken, but a fix has been made that will be available in the next release. You can put this in your code somewhere to be able to use it until then:
function table ...
by Jor'Mox
Mon Jun 03, 2013 12:06 am
Forum: Help Forum
Topic: Problems with simple database
Replies: 3
Views: 3173

Re: Problems with simple database

A number of the database functions are broken. You would be better served by using tables and saving and loading those. You can essentially do the same things with them anyway.