Jump to content
Sign in to follow this  
jfitty

Loop while computer switched on?

Recommended Posts

jfitty

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

Share this post


Link to post
Share on other sites
jfitty

I've done some searching, but I'm not really sure how to use WM_QUERYENDSESSION the way I want to

Share this post


Link to post
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
Sign in to follow this  

×