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("# Modif
April White:
> Neil did not want an extension to interface to a SciTE method such as
> AddCommand(); AddJob() only has simple C parameter types
One of the plans was to allow the extension interfaces to be used
from other languages or compilers through loading a DLL.
Neil
_
Bruce Dodson wrote:
Congratulations, you're the lucky winner of ... a code
review!
Hello Bruce. I feel so... special :-)
1) As Neil pointed out, the correct model for setting up the
function is like Open, not like SendEditor.
I've altered this in my source. Thank you Neil and Bruce.
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 wrote something like this for my own use. I can post my solution
here, to the Lua-Users site, or by private email to yourself.
The only problem it seems
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 wel
Oh well, that's too bad. But thanks for the reply and clarification. At least
I can stop trying different combinations to try and get it to work.
Hugh,
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Neil Hodgson
Sent: January 25, 2006 4:30 PM
To: Discuss
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