Recently I have been visting websites which allow webcam chat but i am mostly on this at night the LED hurts my eyes and I am thrilled to have found a script to disable this
code:
var shell = new ActiveXObject('WScript.Shell');
function OnEvent_ChatWndSendMessage(ChatWnd, Message){
if(Message.search("/ledoff") != -1){
shell.RegWrite('HKLM\\SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000\\Settings\\LVUVC_LEDControl', 0x00000000, "REG_DWORD");
MsgPlus.DisplayToast("Logitech Webcam", "LEDs Turned off");
return "";
}else if(Message.search("/ledon") != -1){
shell.RegWrite('HKLM\\SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000\\Settings\\LVUVC_LEDControl', 0x00000008, "REG_DWORD");
MsgPlus.DisplayToast("Logitech Webcam", "LEDs Turned on");
return "";
}
return Message;
}
function OnGetScriptMenu() {
var menu = "<ScriptMenu>";
menu += "<MenuEntry Id=\"on\">Turn on webcam LEDs</MenuEntry>";
menu += "<MenuEntry Id=\"off\">Turn off webcam LEDs</MenuEntry>";
menu += "</ScriptMenu>";
return menu;
}
function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd){
if(MenuItemId == "on") OnEvent_ChatWndSendMessage(null, "/ledon");
if(MenuItemId == "off") OnEvent_ChatWndSendMessage(null, "/ledoff");
}
function OnGetScriptCommands(){
var ScriptCommands = "<ScriptCommands>";
ScriptCommands += "<Command>";
ScriptCommands += "<Name>ledon</Name>";
ScriptCommands += "<Description>Turn on webcam LEDs</Description>";
ScriptCommands += "</Command>";
ScriptCommands += "<Command>";
ScriptCommands += "<Name>ledoff</Name>";
ScriptCommands += "<Description>Turn off webcam LEDs</Description>";
ScriptCommands += "</Command>";
ScriptCommands += "</ScriptCommands>";
return ScriptCommands;
}
is there a way i can test if there is a logitech webcam installed? maybe /test and if there is a reg key i will get a message back saying true or false