I have a feeling that this could be faster, but I'm not sure, since you use MDX. Try this (I won't test it because I don't want to get the DLL, create a dialog, blah blah etc):
Code:
if ($devent == init) {
  var %dname = $dname, %| = |, %file = $+(",$scriptdir,playlist.txt"), $&
    %dir = $iif($hget(playlist,dir),  $ifmatch,  $+(",$sdir(c:,choose an mp3 directory),")  )
  if ($$isdir(%dir)) { hadd -m playlist dir %dir }
  if ($isfile(%file)) { .remove %file }
  mdx SetMircVersion $version
  mdx MarkDialog %dname
  mdx SetFont %dname 4,5,6,7,8,9 Default 20 40 WebDings
  if ($fopen(playlist)) { .fclose playlist }
  .fopen -n playlist %file

  [color:green]; Maybe the commands inside $findfile() could be faster if put inside an alias.
  ; I didn't bother to check which method would be faster.
  ; Check it yourself, it's worth it, since this is the most important part of the code..
  ; P.S.: Remove the $&, this is just to avoid messing up the board.[/color]
  .echo -q $findfile(%dir,*.mp3,0,  $&
    .fwrite -n playlist $+(",$1-,") [ %| ] did -a %dname 10 $left($nopath($1-),-4)  )

  [color:green]; This $findfile() below could be $did(%dname,10).lines,
  ; but I'm not sure since you're using MDX.[/color]
  hadd -m playlist total $findfile(%dir,*.mp3,0)
  if ($inmp3) { 
    did -a %dname 3 $left($nopath($inmp3.fname),-4) $+ , $asctime($calc($inmp3.length / 1000),n:ss) 
    did -c %dname 10 %i
  }
}


I've also improved some things.
Some tips:
- Using quotes (") for long filenames isn't needed in an identifier.
- Khaled has discouraged the use of identifiers like $scriptdir joint to plain text (like $scriptdirplaylist.txt), I guess mIRC won't support this anymore in the future (versions.txt, mIRC 5.7, item 100)..
- In most cases, using variables is faster than using identifiers, specially when they're repeatedly used. At least the stuff I benchmarked became faster. Always test different methods when speed is an important issue.


* cold edits his posts 24/7