Results 1 to 4 of 4
  1.    #1  
    Here's a simple one to fix an issue I am having with the battery backlight timer resetting itself to 1 min from 5 mins. I am not packaging this up, though, as I think it may not have much use other than as a template if anyone has any similar problems with any settings not being "sticky."
    Code:
    #Read current battery backlight "off" value and reset to 5 mins
    While(1)
         x = RegRead("HKCU", "ControlPanel\Backlight\", "BatteryTimeout" )
         If (x < 300)
              RegWriteDWord("HKCU", "ControlPanel\Backlight\", "BatteryTimeout", 300)
         EndIf
         Sleep(1000)
    EndWhile
    It's pretty trivial, but it seems to do the job. Of course I do take a tiny perfromance hit for having this going, but it's not noticable. I suppose after loading up dozens and dozens of these we might start to see a small drop in performance.
    Last edited by westronic; 03/13/2007 at 04:20 PM.
  2. #2  
    Cool. One suggestion might be to lengthen the sleep if it doesn't really need to check once a second. Like you I'm a little concerned about all of these looping scripts running at the same time. Slowing the check down will help.
  3.    #3  
    Quote Originally Posted by hannip View Post
    Cool. One suggestion might be to lengthen the sleep if it doesn't really need to check once a second. Like you I'm a little concerned about all of these looping scripts running at the same time. Slowing the check down will help.

    I think I'll probably just "piggy-back" this code right into my copy of MyVibe. That way I am adding virtually no additional processing overhead.
  4. #4  
    Yeah, we need to come up with a MainLoop.mscr that checks a specific folder and runs all the scripts it finds there every iteration. Then standardize on that for any future scripts that need to run in a loop.

Posting Permissions