A simpler way to delete the current line would be add:
...
Document.SelectCurrentLine;
Document.SelText := '';
...
Just saying :wink:
But in this case we delete only content of the line. And I need to delete full line with move up. In other words I need to delete the char #13 in the end of ...
Search found 9 matches
- 24 Apr 2015 13:44
- Forum: Scripts
- Topic: Current line index
- Replies: 9
- Views: 55289
- 24 Apr 2015 11:36
- Forum: Scripts
- Topic: Current line index
- Replies: 9
- Views: 55289
Re: Current line index
Thanks!
But I found another solution. :)
//Pascal
var
y: integer;
list: TStringList;
begin
Document.BeginUpdate();
Document.Wordwrap:= False;
y:= Document.CursorY; //Current line
list:= TStringList.Create;
list.Text:= Document.Text;
list.Delete(y);
Document.Text:= list.Text; //after ...
But I found another solution. :)
//Pascal
var
y: integer;
list: TStringList;
begin
Document.BeginUpdate();
Document.Wordwrap:= False;
y:= Document.CursorY; //Current line
list:= TStringList.Create;
list.Text:= Document.Text;
list.Delete(y);
Document.Text:= list.Text; //after ...
- 24 Apr 2015 08:47
- Forum: Scripts
- Topic: Current line index
- Replies: 9
- Views: 55289
Re: Current line index
Thanks!
And how I can delete the current line in pascal?
And how I can delete the current line in pascal?
- 23 Apr 2015 22:09
- Forum: Scripts
- Topic: Current line index
- Replies: 9
- Views: 55289
Current line index
Hello!
How can I get the current line index in pascal script?
How can I get the current line index in pascal script?
- 03 Apr 2015 21:31
- Forum: Extensions
- Topic: About extensions
- Replies: 3
- Views: 140461
Re: About extensions
Could you please update the links above?
PS. Sorry. I found them.
PS. Sorry. I found them.
- 02 Apr 2015 15:38
- Forum: Scripts
- Topic: Delete Duplicates in the document
- Replies: 0
- Views: 31896
Delete Duplicates in the document
Can you help me. I try to use property TDuplicates of the component TStringList, but I get error "Undeclared identifier: Duplicates".
// Pascal script
// Извлечение из текста ссылок
var
i,j: integer;
list:TStrings;
st:string;
begin
i := ScriptUtils.PosFrom('http://', Document.Text, 0);
list ...
// Pascal script
// Извлечение из текста ссылок
var
i,j: integer;
list:TStrings;
st:string;
begin
i := ScriptUtils.PosFrom('http://', Document.Text, 0);
list ...
- 16 Apr 2014 14:47
- Forum: Scripts
- Topic: Help with script
- Replies: 6
- Views: 46609
Re: Help with script
Thank you! The second script works perfectly.
- 16 Apr 2014 09:26
- Forum: Scripts
- Topic: Help with script
- Replies: 6
- Views: 46609
Re: Help with script
I need a script.
- 16 Apr 2014 08:48
- Forum: Scripts
- Topic: Help with script
- Replies: 6
- Views: 46609
Help with script
Hello. Can you help me with a script.
In your programm is the script that delete all spaces in the end of lines. How can I do this with the startspaces?
Sorry for my English. Hope you understand me.
In your programm is the script that delete all spaces in the end of lines. How can I do this with the startspaces?
Sorry for my English. Hope you understand me.
