mIRC Homepage
i just saw that they added /drawpic -o but if you want to draw an icon from a dll you have to do this (win98)

Code:
//window -ap @test | /drawpic -o @test 10 10 3 c:\windows\system\shell32.dll


but this only works on windows 98 because the location of shell32.dll is different on different versions of windows

so it would be cool to locate a dll by using something like this
Code:
 $sysdir $+ shell32.dll


These can be scripted with the help of COM objects:
Code:
alias specialdir {
  if $findtok(win sys temp,$1,32) { var %a = sd $+ $ticks, %b = %a $+ d, %c = $ifmatch - 1 }
  else return
  .comopen %a Scripting.FileSystemObject
  if $comerr { return <error> }
  .comclose %a $com(%a,GetSpecialFolder,1,uint,%c,dispatch* %b) $com(%b,Path,2)
  %a = $com(%b).result
  .comclose %b
  return %a
}
Use
$specialdir(win) for the windows folder
$specialdir(sys) for the system folder
$specialdir(temp) for the Temp folder
A less intensive solution might be to just $findfile().

Eamonn.
Less intensive? Hardly. A comobject accessing an enviornmental variable is much more proficient than find file, in many repects.
© mIRC Discussion Forums