pixi Posted February 16, 2008 Share Posted February 16, 2008 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 Link to comment Share on other sites More sharing options...
Uten Posted February 16, 2008 Share Posted February 16, 2008 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.. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Swift Posted February 16, 2008 Share Posted February 16, 2008 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 Link to comment Share on other sites More sharing options...
pixi Posted February 16, 2008 Author Share Posted February 16, 2008 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 Link to comment Share on other sites More sharing options...
pixi Posted February 16, 2008 Author Share Posted February 16, 2008 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 Link to comment Share on other sites More sharing options...
James Posted February 16, 2008 Share Posted February 16, 2008 I am guessing it maybe found in the registry. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now