With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
Well I am no expert, and there is certainly a much easier way of doing this, but I have a command that can do it. After the message box in notepad, paste the following: set shellobj = CreateObject("WScript.Shell")shellobj.run "cmd"wscript.sleep 100shellobj.sendkeys "shutdown"wscript.sleep 20Shellobj.sendkeys " /s"wscript.sleep 20shellobj.sendkeys [ENTER]the first 2 lines just tells the program to run command promptthen it says to wait 100 miliseconds, then tells it to write "shutdown". Then the program waits another 20 ms, then writes " /s", 20 ms again and then hits enter. If you write: "Shutdown /s" in command prompt and hit enter, it shuts the pc down. (you can change the miliseconds how you want, but I would recommend to put a pause between every step)(you can also write: wscript.sleep 20Shellobj.sendkeys "cls"wscript.sleep 20shellobj.sendkeys [ENTER]at the end to make command prompt close again.
I'd like to be able to name the buttons you press, (instead of only having OK, Cancel, Yes, etc.) Is this possible?I'd also like to know how to have an outcome according to what someone pressed. (For example if I press OK something different happens than if I press Cancel)
yes just put another one below it like this:x=msgbox("Your Text Here" ,0, "Your Title Here")x=msgbox("Your Text Here" ,0, "Your Title Here")x=msgbox("Your Text Here" ,0, "Your Title Here")
This is a good tutorial but is there a way to have it open another message box?
i want to make the computer shutdown after the message pops up how to do this?
I am a beginner but i wan tot try something new .. does anyone know how to add a script while in the program? for ex... user can create their own command! so there is a text box and it asks them do u want to make a commandand if they say yes it asks what do u need to type to ex.. ur command. then they type it in while it scans throught the other commands to see if it is not take... And if it is not taken then it takes them to the next str text and it asks them what will it say when the command ex.. and when they type that it they press done
0 =Application modal (the current application will not work until the user responds to the message box)how to do this?
Join 2 million + to receive instant DIY inspiration in your inbox.
Download our apps!
© 2016 Autodesk, Inc.