Not sure if this will work as I don't have the camera. It's a bit longer than I said it would be as I added menus etc incase you wanted to pass it around... Let me know if you want to distribute it and I'll package it into a PLSC file for easy importing.
js 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;
}