mIRC Home    About    Download    Register    News    Help

Print Thread
#110325 06/02/05 11:14 AM
Joined: Oct 2004
Posts: 38
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2004
Posts: 38
hi all!

I have dialog in script, which contains this:

Code:
 edit "", multiline_editbox, 30 130 135 90,  multi autovs tab 2 


and trouble is, that i can`t get full editbox content thru the $did(multiline_editbox) when there is "$crlf" (many lines in), more precisely i just can get _only_ 1st line.

How to get ALL lines in that situation?

I shall be very grateful for help.

#110326 06/02/05 08:00 PM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
I noticed that you specified the ID of the object as multiline_editbox. I thought that ID's were supposed to be numbers. Anyways, you can fix that problem by using /did -i. For example:

Code:
var %a = 1
While ($Read(File.txt,%a)) {
did -i $DName 1 %a $IfMatch
inc %a
}


- Relinsquish
#110327 07/02/05 10:21 PM
Joined: Oct 2004
Posts: 38
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2004
Posts: 38
thanks in reply, but i don`t need to fill in an editbox, but read from it (f. ex. to a variable or file).

#110328 12/02/05 02:06 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
It depends on what you want to do with it, and on how many lines there are and how much data. Some of the following won't work if there is too much data...

$did(DIALOG,ID,1) gets the 1st line
$did(DIALOG,ID,2) gets the 2nd line
$did(DIALOG,ID,21) gets the 21st line
  • var %i = 1
    while $did(DIALOG,ID,%i) {
    echo -a $v1
    inc %i
    }


//write file.txt $didtok(DIALOG,ID,10)
//tokenize 10 $didtok(DIALOG,ID,10) | echo -a $*

//savebuf -o DIALOG ID file.txt

//filter -if DIALOG ID file.txt *match*
//filter -iw DIALOG ID @window


Link Copied to Clipboard