Power Options control

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
PepsiHog
Automation Wizard
Posts: 511
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Power Options control

Post by PepsiHog » Sat Sep 05, 2009 1:38 pm

So.....

I have Wondows XP. My computer is a laptop. Windows is able to control things like turning off the monitor after so many minutes and turning off the hard drive after so many minutes. It can also detect whether the laptop lid is open or closed.

Ok. So, I am writting a program where I'd like to control these things as well. Does anyone know what command(s) will do this.

I figure it is a lib func or a dll or something of the sort. But I have no experience in that field. If you can help, I need specifics.

Such as

"complete comand,,,,,variables, options and a note that would be;
this will turn off your monitor/ change this to.... to have it turn back on

I am mostly interested in the power option that controls the on/off for the monitor. And the ability to detect the lid being open or closed.

And ofcourse, I am ALWAYS open for ANY suggestions for anything that may accomplish this in any other manner. But the commands are preferable.

Thanks in advance,
PepsiHog
......and YES, I have a glass of Pepsi right next to me. And it's only morning. :P
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2021) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Sep 07, 2009 3:26 am

I'm not an expert in this I'm also not totally clear on what you want to accomplish... but.

I posted a DLL call for hibernate HERE. (Last item in the thread). If you comprehend Microsoftese then you can perhaps find the rest of what you need by beginning HERE at the page for "SetSuspendState". Note that they also point you to THIS page on power schemes.

Good luck.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts