Jump to content

Recommended Posts

Posted

is it possible to set the on/off button on a laptop a hotkey???

i try to search but i dont found anything about it??

/Andreas

Posted

Hi Andreas,

Interesting question. Unfortunately I don't have a good answer, but maybe some ideas you could work on?

As the Power button ain't a regular keyboard key I doubt you will find a regular HotKey solution. If I was to explore this I would try to figure out if I could detect any windows message corresponding to shutdown or suspend from the OS. I would also explore if any of the PowerManagement API's could be hooked or used. maybe you could get some ideas in this topic?

Best wishes for your quest..:)

Posted

or you could just use Shutdown() and set it as a hotkey like this:

Hotkeyset("{END}", "_Shutdown")

Func _Shutdown()

Shutdown(8)

ENdfunc

i think its 8...not sure check the helpfile :)

Posted

when y say that u give me a idea :-)

in the power manager i can chose what i want to to if i press the button hibernate,standby,"ask me what to to"

if i chose "ask me what to do" a windows will appear, and my be detect that window.

i write a scrips and se if it works, i come back if it works

Thanks

/Andreas

Posted

no it works what i want it to work,i detect the window and can do what i want :-)

thanks for your fast replay

/Andreas

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
  • Recently Browsing   0 members

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