mIRC Home    About    Download    Register    News    Help

Print Thread
#12544 22/02/03 11:28 PM
Joined: Jan 2003
Posts: 41
T
Thedude Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 41
I have this MP3 player.
How can i use /loadbuf to add the files in the playlist-file, playlist.txt, into a dialog without the path of the mp3s?

#12545 23/02/03 01:10 AM
Joined: Feb 2003
Posts: 27
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Feb 2003
Posts: 27
Use $nopath(c:\Path\to\file.mp3)

what I would do is load the files into a window called @filelist then use this code to load to the dialog

Code:
    var %files 1
    while (%files <= $line(@filelist,N)) {
;while %files is less then or equal to the number of lines in @filelist
      did -a <Dialog Name> <Id> $nopath($line(@filelist,%files))
;add the file name to the dialog without the path in it
      inc %files
;increase %files by one
    }
  

#12546 23/02/03 09:03 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Here's one idea you might try. Loadbuf, but itself, can't alter the text it's loading, but you can do a fairly fast loop through the list after it's loaded to remove the paths.
Code:

on *:DIALOG:dname:init:*:{
 
  ; code here, whatever you like
 
  ; If your listbox/combo is ID number 4
  ;
  loadbuf -o $dname 4 playlist.txt
 
  ;  Now remove the paths for each entry in the listbox.
  ;
  var %i
  while ($did(4,%i).text) {
    did -o $dname %i $nopath($ifmatch)
    inc %i
  }
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#12547 23/02/03 10:27 AM
Joined: Jan 2003
Posts: 41
T
Thedude Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Jan 2003
Posts: 41
yeah thats kinda what i used to use but it makes mIRC freeze if the playlist is big..


Link Copied to Clipboard