loading
2 Comments

Tell us about yourself!

Complete Your Profile
  • How to: Make a message box using VBScript

    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 recom...see more »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)

    View Instructable »