Saturday, February 22, 2014

Can I stop my screen from locking due to inactivity?

Tonight I was watching movie on my TV being broadcasted via HDMI from my Laptop.

It was annoying to force my laptop from dying every now and then.  (Somehow I was not able to change power management settings to never sleep, don’t know why!!!)



So I quickly wrote this PowerShell script, to keep on clicking at random places on my screen:

Powershell Script saved as txt file  save this text on your machine and rename it as *.ps1



Note: You may have to use Get-ExecutionPolicy and Set-ExecutionPolicy to allow powershell scripts on your machine.

Help Get-ExecutionPolicy -Full

Help Set-ExecutionPolicy -Full

only move mouse

2 comments:

  1. I just got a change request from friend .
    he says , he want similar functionality , but while playing youtube on laptop itself. No TV connected to via HDMI .

    And clicks would make him frustrated .
    Here is the script which clicks on a cordinate , after that just keep on moving mouse a little bit . No clicks :
    only move mouse

    ReplyDelete
  2. Would this possibly work the opposite ? It seems i remember now, a few days back changing my SS from none to blank and then my PC started sleeping after just a few min.

    ReplyDelete