Re: [scite] Possibly OTLua question

2006-01-18 Thread Kein-Hong Man
Doyle Whisenant wrote: [snip] function read_session() local ln = 0 local n = 1 local bufferpath = props['FilePath'] local f = io.open("SciTE.ses", "r") if not f then return nil end for ln in f:lines() do local s=f:read"*l" <-- print (n) n=n+1 end f:close() return t

[scite] Possibly OTLua question

2006-01-18 Thread Doyle Whisenant
Sorry if this is off topic but it's for SciTE. I am very new to lua so please bear with me. I have lua functions writing the bookmarks to a file and reading it back in and setting the bookmarks. So far, so good. Since SciTE writes a *.ses file I want to read it in and append the bookmark line n

[scite] Re: can an extender like Lua acces the current buffer?

2006-01-18 Thread Bruce Dodson
Neil has answered with the way to do the equivalent of host->Save() from an extension, and I see that you don't need to do this any more since you found a better way to do it. But anyway, for the sake of completeness, I'll answer the second part even though you probably don't need that anymor

Re: [scite] can an extender like Lua acces the current buffer?

2006-01-18 Thread April White
Neil Hodgson wrote: Something like host->Perform("saveas:" + host->Property("FilePath")) or host->menucommand:(IDM_SAVE) and host->CurrentBuffer() I don't know of an easy way to get the buffer number but the file name is available. I'd prefer extending the set of text commands

Re: [scite] A revision possible based on SciTE documentation

2006-01-18 Thread Neil Hodgson
April White: > The revisions I have been working on for the new job system is now > storing the buffer name into the job object, so the 'building' flag can > be set. It should not be hard to revise the code that handles the > "command.replace.selection..." code to locate the original buffer and >

Re: [scite] can an extender like Lua acces the current buffer?

2006-01-18 Thread Neil Hodgson
April White: > I've found that using > host->Save() Something like host->Perform("saveas:" + host->Property("FilePath")) or host->menucommand:(IDM_SAVE) > and > host->CurrentBuffer() I don't know of an easy way to get the buffer number but the file name is available. I'd pre