mIRC Home    About    Download    Register    News    Help

Print Thread
#76029 21/03/04 09:21 AM
Joined: Feb 2004
Posts: 16
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Feb 2004
Posts: 16
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
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
/loadbuf can do that.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#76031 21/03/04 10:14 AM
Joined: Feb 2004
Posts: 16
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Feb 2004
Posts: 16
Can i be so lucky as to get an example? Not havin any luck.

#76032 21/03/04 10:22 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Assuming:

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

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


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#76033 21/03/04 10:54 AM
Joined: Feb 2004
Posts: 16
D
Pikka bird
OP Offline
Pikka bird
D
Joined: Feb 2004
Posts: 16
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,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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