Mostly a product of boredom, but I thought I'd make a Volume Control dialog for practice. To use, load into a new Remotes file and right-click in a channel, then select 'Volume Control'. Drag the bar to the right to increase the volume, and to the left to decrease it.
Couldn't figure out how to incorporate a Mute/Unmute function, so if anyone wants to lend me some assistance, I'll incorporate it. :)
Edit: Got a Mute/Unmute function working now, posted updated code.
;Simple Volume Control
;by Zericho
;irc.rizon.net #Oni
menu channel {
Volume Control:dialog -dm vol vol
}
dialog Vol {
title "Volume Control"
size -1 -1 245 23
option dbu
button "Mute/Unmute", 13, 202 4 40 15
scroll "", 12, 4 -7 195 23, horizontal range 0 65535
}
on *:dialog:vol:init:0: {
did -c $dname 12 $vol(master)
}
on *:dialog:vol:scroll:12: {
vol -v $did($did).sel
}
on *:dialog:vol:sclick:13: {
if ($vol(master).mute == $true) {
/vol -vu2
/did -u $dname 13
/did -e $dname 12
}
elseif ($vol(master).mute == $false) {
/vol -vu1
/did -b $dname 12
}
}