StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Register | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 General Action Scripts
 sleep/standby and hibernate command
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Giusepppe

5 Posts

Posted - 05/13/2017 :  15:46:57  Show Profile  Reply with Quote
I am using very poor lines for these scripts. Do you have any better ones?

For sleep, i use this script;
acSendKeys("@")
acDelay(50)
acSendKeys("{TAB}{TAB}{TAB}~{DOWN}~")


For hibernate:

acSendKeys("{DELAY=100}@r shutdown -h{ENTER}")

NOTE: I'm using Windows8.1 with Modern UI.

Edited by - Giusepppe on 06/09/2017 21:33:43

Rob

USA
2432 Posts

Posted - 07/04/2017 :  11:13:39  Show Profile  Visit Rob's Homepage  Reply with Quote
Really, the only thing I can think of off the top of my head to use acRunProgram and leverage the command line options Windows has, as shown here:

https://superuser.com/questions/42124/how-can-i-put-the-computer-to-sleep-from-command-prompt-run-menu
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2017 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000