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
}