Jump to content

Windows AutoIt to Standby


gertsolo
 Share

Recommended Posts

Hey,

I have a remote PC which I use as server for my media files. When I don't use it I want it to go to standby after, for example, one hour. When I want to use it I wake it up on Lan.

When I use the default windows power settings it works fine from time to time, but not always. Is there a better AutotIt alternative for monitoring a windows system and letting it go to standby when there is no activity?

thx

Edited by gertsolo

The more you learn, the less you know.

Link to comment
Share on other sites

It depends on how well you define "idle". If you are only looking at no mouse and no keyboard use, that's easy enough. This CodeProject article has code for a dll that will let you check the ticks (a unit of time) that the user has not moved the mouse or touched the keyboard.

Hi,

have a look at the _Net* functions.

You may loop and check if files are open. In the loop you have a sleep (60000)

If no Files are open count up an counter and shutdown server if counter = 60

If files are open reset counter.

;-))

Stefan

Link to comment
Share on other sites

It depends on how well you define "idle". If you are only looking at no mouse and no keyboard use, that's easy enough. This CodeProject article has code for a dll that will let you check the ticks (a unit of time) that the user has not moved the mouse or touched the keyboard.

I use is as remote server, so there is no mouse/keyboard activity. I want it to go to sleep when no other computers or media servers are connecting to it.

The more you learn, the less you know.

Link to comment
Share on other sites

Then you might want to look at the command "net session" in Windows. I don't know for sure how it works, but I believe it will tell you (via the console) about any connections to the computer.

net session

Is literally what you would type into the prompt. I don't know if that was clear enough.

Edited by Richard Robertson
Link to comment
Share on other sites

Then you might want to look at the command "net session" in Windows. I don't know for sure how it works, but I believe it will tell you (via the console) about any connections to the computer.

net session

Is literally what you would type into the prompt. I don't know if that was clear enough.

Yup, it is clear enough. I already told me that there are no active connections, so there is something else that keeps it awake.

thx

Edited by gertsolo

The more you learn, the less you know.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...