1)

; PROBLEM:
;
; a wshshell popup that is created from within mIRC, whether that is
; in pure COM, or with the use of vbscript with the scripcontrol object,
; is not being destroyed when its timeout parameter (number of seconds)
; is reached. The pure vbscript equivalent in a .vbs file however performs
; it correctly, which leads me to believe somehow mIRC is interfering with
; the destroying of the popup window
;

/popup_mirc, and /popup_scriptcontrol don't destroy the popup, /popup_vbs does.

Tested on mIRC 6.16
Windows XP+SP2

Code:
alias popup_mirc {
  ; no auto close
  var %wsh = wsh $+ $ticks, %t
  .comopen %wsh wscript.shell
  if ($comerr) return
  ; tried types:
  ;- uint, ui1, ui2, ui4, int, i1, i2, i4, r4, r8, bstr, string
  ;- same as above but by reference (uint* vs uint)
  ;- using variant <type> doesn't pop up a window, so definitely not variant type
  %t = $com(%wsh,popup,1,bstr*,prompt,int,2,bstr*,title,i2,0)
  .comclose %wsh
}
 [color:red]  [/color] 
alias popup_scriptcontrol {
  ; no auto close
  if ($os isin 9598) return
  var %mss = mss $+ $ticks, %t
  .comopen %mss MSScriptControl.ScriptControl
  %t = $com(%mss,language,4,bstr*,vbscript)
  %t = set shell = createobject("wscript.shell") $crlf shell.popup "prompt",2,"title",0
  %t = $com(%mss,executestatement,1,bstr*,%t)
  .comclose %mss
}
 [color:red]  [/color] 
alias popup_vbs {
  ; auto close
  write popup.vbs set shell = createobject("wscript.shell")
  write popup.vbs shell.popup "prompt",2,"title",0
  run popup.vbs
  .timer 1 5 .remove popup.vbs
}



2) When specifying dispatch as type, and the dispatch value being a number, mIRC crashes instantly. Note that this sendkeys method isn't supposed to take another object as a parameter (which is what the dispatch type is there for), however mIRC should not crash nevertheless. Some further testing showed it only occurs with numbers (666 in the example)

Code:
alias dispatch_crash {
  .comopen wsh wscript.shell
  ; crash when specifying a number of type "dispatch", string is fine
  .comclose wsh $com(wsh,sendkeys,1,dispatch,666,bstr*,crash)
}


Gone.