mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2003
Posts: 1
Z
zeroid Offline OP
Mostly harmless
OP Offline
Mostly harmless
Z
Joined: Sep 2003
Posts: 1
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



Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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

Last edited by qwerty; 08/07/04 02:32 PM.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
A less intensive solution might be to just $findfile().

Eamonn.

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Less intensive? Hardly. A comobject accessing an enviornmental variable is much more proficient than find file, in many repects.


-KingTomato

Link Copied to Clipboard