mIRC Home    About    Download    Register    News    Help

Print Thread
#76029 21/03/04 09:21 AM
D
droplogic
droplogic
D
Need some help on how to open a txt inside a dialog so that it displays the content of the txt inside the dialog itself.

Any ideas?

#76030 21/03/04 09:57 AM
L
LocutusofBorg
LocutusofBorg
L
/loadbuf can do that.

#76031 21/03/04 10:14 AM
D
droplogic
droplogic
D
Can i be so lucky as to get an example? Not havin any luck.

#76032 21/03/04 10:22 AM
H
Hammer
Hammer
H
Assuming:

Dialog name: dlgNotepad
Editbox ID: 1
Filename = versions.txt

/filter -fo dlgNotepad 1 versions.txt
/loadbuf -o dlgNotepad 1 versions.txt

#76033 21/03/04 10:54 AM
D
droplogic
droplogic
D
Thanks, it works..but it displays all in one line, even with -p.

Dialog Test {
Title "Test"
Size -1 -1 200 200
Edit "" 1, 5 5 190 190
}
on *:dialog:Test:init:*:{
filter -fo test.txt Test 1
loadbuf -o Test 1 test.txt
}
Inside test.txt i have..
One
Two
Three
Four
Five
..but it displays them in the Editbox like so..
One [] Two [] Three []..etc
[]=a box indicating a return i guess.

Edit:

Just tried changing the Edit "" to a List.
It works better this way, displays them properly, but now it displays thus..
One
Two
Three
Four
Five
One
Two
Three..etc etc

Any way to set it to only load it once?

Edit:

N/m, got it. Thanks for helping out a newbie.

#76034 21/03/04 01:56 PM
Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
You could still load the file to an edit control if you had added these properties:
  • Edit "" 1, 5 5 190 190, multi return
But it's better to stick to a list because its buffer limit (i.e. the amount of data it can show) is more tolerant.


Link Copied to Clipboard