Jump to content

Loop while computer switched on?


Recommended Posts

Hey guys,

I'm trying to write a script that loops continuously in the background when the computer is on, and can detect when the computer wants to shutdown. I'm having some trouble getting it working. Basically, when the computer starts up it will launch this program, which runs while the computer is on, but when the user wants to shutdown/restart, the program kicks in and gives the user some figures. I'm guessing I would have to use WM_QUERYENDSESSION to tell when Windows is closing.

Hope that makes some sense

Thanks

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...