Tdk161 Valued Contributor


Joined: 08 Feb 2005 Posts: 399 Location: ITALY
|
Posted: Sun Dec 26, 2010 11:32 pm Post subject: Copy/Paste List help |
|
|
Hi to all,
I writed this script to add/remove comment into a script inside the vds ide
| Code: | Title Rem/Unrem by Andrea Sperotti
Option DECIMALSEP,"."
%%Elenco = @New(LIST)
%%Uscita = @New(LIST)
%%Rem = "#"
%W = @WinExists(#TMainWin)
DIALOG CREATE,REM/unREM,-1,0,232,40,ONTOP,NOTITLE
DIALOG ADD,STYLE,STYLE1,6,,B,,
DIALOG ADD,PROGRESS,PRO1,19,5,223,14,0,,SMOOTH,HORIZONTAL
DIALOG ADD,TEXT,TEXT1,-1,14,81,19,Progress...,,STYLE1
Dialog Show
Clipboard CLEAR
Window SEND,%W,@CTRL(C)
Wait .4
List paste,%%Elenco
Wait .2
%m = @Count(%%Elenco)
If @Equal(%m,0)
Warn Niente di selezionato
Stop
End
%c = 0
Repeat
%c = @Succ(%c)
%l = @Next(%%Elenco)
If @Equal(@Substr(%l,1,@Len(%%Rem)),%%Rem)
List Add,%%Uscita,@Substr(%l,@Succ(@Len(%%Rem)),@Len(%l))
Else
List Add,%%Uscita,%%Rem%l
End
Until @Equal(%c,%m)
List Copy,%%Uscita
Window SEND,%W,@CTRL(V)
List Close,%%Elenco
List Close,%%Uscita
Stop
|
but I have 2 troubles
1- sometimes launching the compiled Exe from tool menu but nothing happen
2 every time add a blank line at the end of pasted text
Why?
Help me please |
|