PDA

View Full Version : detect OSD dismissal



xrwz
January 5th, 2006, 08:49 PM
here's what I wanna do: on detecting ring from modem it mutes the volume and shows the mute osd forever. that part is working. now when I click on the mute osd I want to detect that the osd has closed / is closing and unmute the volume.
thanks.

Promixis
January 7th, 2006, 09:10 AM
ok, drop this in a script action





--[[

OSD Example to detect OSD Double Click

--]]

local settings = table.copy (osd.Styles.StatusLightBlue)
settings.Text = 'My Mute OSD'
settings.TimeOut = 0


MuteOSD = osd.Classes.Text:New (settings)

MuteOSD.OnLeftButtonDblClick = function (self)

print ('osd closing - put your code here')

osd.Classes.Text.OnLeftButtonDblClick (self)

end



MuteOSD:Show ()


let me know if you have any questions...

xrwz
January 7th, 2006, 04:19 PM
Thanks, I already did something similar in a script of mine (i.e. generating the osd myself). I was wondering if there's a way to detect the closing of the mute osd that's shown when you check "On Screen Display" in the Change Mute action.

Thanks for your help.

Promixis
January 7th, 2006, 05:12 PM
You could do that directly using by changing the audiomixer.lua file in the luascript dir.

xrwz
January 7th, 2006, 08:01 PM
did that & works a treat. exactly what I needed.
thanks for helping.

Promixis
January 8th, 2006, 10:25 AM
sure ;)