Re: [scite] Lua question

2006-02-03 Thread Neil Hodgson
Kein-Hong Man: Bracket with the following (barely tested): editor.UndoCollection = false -- edit stuff here editor.UndoCollection = true No. Turning undo collection off and on breaks the undo collection sequence so you are no longer able to undo correctly back past that

Re: [scite] Lua question

2006-02-03 Thread Neil Hodgson
Me: The correct thing to call is editor:BeginUndoAction() before the compound action and editor:EndUndoAction() after. I misread the requirement which is to hide the modification marker text change so it isn't a step in the undo history. This is not possible in Scintilla/SciTE. Neil

Re: [scite] Lua question

2006-02-03 Thread Kein-Hong Man
Neil Hodgson wrote: Kein-Hong Man: Bracket with the following (barely tested): editor.UndoCollection = false -- edit stuff here editor.UndoCollection = true No. Turning undo collection off and on breaks the undo collection sequence so you are no longer able to undo correctly back

Re: [scite] Lua question

2006-02-02 Thread Kein-Hong Man
Istvan wrote: Kein-Hong Man wrote: Istvan wrote: I wish to write a lua script which add this text: Last Modified: 2006.02.01 at the top of the edited file when I save it. Try this: editor.TargetStart = editor:PositionFromLine(0) editor.TargetEnd = editor.LineEndPosition[0]

[scite] Lua question

2006-02-01 Thread Istvan
Hi, I wish to write a lua script which add this text: Last Modified: 2006.02.01 at the top of the edited file when I save it. I use OnSave() and I could add the text with these lines: addtext=# Modified: ..os.date('%Y-%m-%d %H:%M:%S')..\r\n editor:InsertText(0,addtext) It works well, without

Re: [scite] Lua question

2006-02-01 Thread Kein-Hong Man
Istvan wrote: I wish to write a lua script which add this text: Last Modified: 2006.02.01 at the top of the edited file when I save it. I use OnSave() and I could add the text with these lines: addtext=# Modified: ..os.date('%Y-%m-%d %H:%M:%S')..\r\n editor:InsertText(0,addtext) It works well,

Re: [scite] Lua question

2006-02-01 Thread Istvan
Kein-Hong Man wrote: Istvan wrote: I wish to write a lua script which add this text: Last Modified: 2006.02.01 at the top of the edited file when I save it. Try this: editor.TargetStart = editor:PositionFromLine(0) editor.TargetEnd = editor.LineEndPosition[0] editor:ReplaceTarget(#

Re: [scite] Lua question

2006-01-30 Thread Manta (SciTE)
I need to cycle through all of the buffers, catching bookmarked lines If setting a bookmark would require a buffer save, I'd be OK I may be completely off track here, or assuming too much, or both, but: Would it not be more intuitive to have bookmarks saved for the buffer only when the

Re: [scite] Lua question

2006-01-30 Thread Doyle Whisenant
Manta (SciTE) wrote: I need to cycle through all of the buffers, catching bookmarked lines If setting a bookmark would require a buffer save, I'd be OK I may be completely off track here, or assuming too much, or both, but: Would it not be more intuitive to have bookmarks saved for the

[scite] Lua question

2006-01-29 Thread Doyle Whisenant
Is there an event that I can use to run a lua script when SciTE is closing similar to OnOpen? Is it possible to do this? If so, how? I need to access all open buffers when SciTE closes. Anyone know of a reliable way to do this? -- Doyle Whisenant http://www.freewebs.com/mekdesign/ mechanic

Re: [scite] Lua question

2006-01-29 Thread April White
Doyle Whisenant wrote: Is there an event that I can use to run a lua script when SciTE is closing similar to OnOpen? Is it possible to do this? If so, how? I need to access all open buffers when SciTE closes. Anyone know of a reliable way to do this? Do you want when a buffer closes or

Re: [scite] Lua question

2006-01-29 Thread Doyle Whisenant
April White wrote: Doyle Whisenant wrote: Is there an event that I can use to run a lua script when SciTE is closing similar to OnOpen? Is it possible to do this? If so, how? I need to access all open buffers when SciTE closes. Anyone know of a reliable way to do this? Do you want when a

Re: [scite] Scite - Lua Question

2005-05-26 Thread Steve Donovan
[EMAIL PROTECTED] 05/26/05 12:24 PM LUA CAN call functions with arguments in external dll/so libraries. loadlib requires one function to initialize and bind the rest of the functions in the dll/so to LUA This function is not ment to execute any code apart from binding new functions to LUA so

Re: [scite] Scite - Lua Question

2005-05-25 Thread Steve Donovan
Ah, the file wasn't opened successfully, so f was null. I really should be more careful about these things! steve d. [EMAIL PROTECTED] 05/24/05 3:39 AM What is wrong with the following Lua function? This is taken from scite_other.lua by Steve Donovan. I marked the error line in the code

[scite] Scite - Lua Question

2005-05-24 Thread Doyle Whisenant
What is wrong with the following Lua function? This is taken from scite_other.lua by Steve Donovan. I marked the error line in the code below. The error message is: attempt to index local `f' (a nil value) function Perform(verb,arg,other) local f = io.open(TEMP_FILE_IN,'w') if not arg