This is a very simple volume control dialog. You can raise or lower the volume. You can also mute it if you want.
*This controls the volume of your computer itself not the sounds of mIRC
alias voll { dialog $iif($dialog(volume),-v,-am) volume volume }
dialog volume {
title "Toggle Volume"
size -1 -1 220 30
scroll "", 2, 7 7 145 19, horizontal top range 0 100
button "Mute", 5, 160 7 55 19
}
on *:dialog:volume:*:*: {
var %volume $round($calc($vol(master) * 100 / 65535),0)
if ($devent = init) {
did -c volume 2 %volume
dialog -t volume Toggle Volume $chr(160) $+(%volume,/100%)
}
if ($devent = scroll && $did = 2) {
vol -v $calc(653.5 * $did($dname,2).sel)
var %sound $iif($did($dname,2).sel = 0, $chr(160) No Sound,$+($did($dname,2).sel,/100%))
dialog -t volume Toggle Volume $chr(160) %sound
}
if ($devent = sclick && $did = 5) {
if ($vol(master).mute) {
vol -vu2 | did -ra volume 5 Mute
dialog -t volume Toggle Volume $chr(160) $+(%volume,/100%)
}
else { vol -vu1 | did -ra volume 5 UnMute | dialog -t volume Toggle Volume $chr(160) $chr(160) @Muted@ }
}
}