mIRC Home    About    Download    Register    News    Help

Print Thread
#2321 18/12/02 12:10 AM
Joined: Dec 2002
Posts: 27
NeX Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Dec 2002
Posts: 27
Hi,
I would like to know how I can play a .ini .mrc .txt or other text files in an edit from a dialog.

Is this possible?

NeX. smirk


__NeX¯¯¯ smirk
#2322 18/12/02 12:35 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
From /help /loadbuf

/loadbuf [lines] [-pirsgleopcNt<topic>] <window | dialog id> <filename>
Loads the specified number of lines from the end of the file of filename into the specified window.

The -p switch forces lines of text to wrap when added to the window.
The -i switch makes sure that lines are indented if they wrap.
The -r switch clears the contents of the output window.
The -e switch evaluates variables and identifiers in the line being read.

The -t switch loads the text under the [topic] section in an INI or plain text file.

The -o switch indicates that you have specified [dialog id] parameters instead of a window name in order to load text into a custom dialog control.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#2323 18/12/02 12:49 AM
Joined: Dec 2002
Posts: 27
NeX Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Dec 2002
Posts: 27
thx :]

NeX smirk


__NeX¯¯¯ smirk
#2324 18/12/02 12:46 PM
Joined: Dec 2002
Posts: 27
NeX Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Dec 2002
Posts: 27
Hi,
on *:dialog:mirczoom:menu:5:{ set %mz-sfile $sfile($mircdir,Choissez un document) | loadbuf -o mirczoom 36 $nopath(%mz-file) }

This don't work correctly : * /loadbuf: insufficient parameters
I would want that he load a txt file in my edit, but when I write this : on *:dialog:mirczoom:menu:5:{ loadbuf -o mirczoom 36 $sfile($mircdir,Choissez un document) }
He write the shortcut example :
my documents/mirc/myscript/file.txt ligne1
my documents/mirc/myscript/file.txt ligne2
my documents/mirc/myscript/file.txt ligne3

frown

NeX smirk


__NeX¯¯¯ smirk
#2325 18/12/02 02:24 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Code:

on *:dialog:mirczoom:menu:5: loadbuf -o $dname 36 $+(",$$sfile($mircdir,Choissez un document),")

Your filename has spaces in it, so you need to double-quote the filename. Simple fix. smile


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#2326 18/12/02 03:01 PM
Joined: Dec 2002
Posts: 27
NeX Offline OP
Ameglian cow
OP Offline
Ameglian cow
Joined: Dec 2002
Posts: 27
lol thx

NeX smirk


__NeX¯¯¯ smirk

Link Copied to Clipboard