krazedkat
03-16-2008, 07:07 PM
ok so im new to the whole vbs scripting
so far i have made this code:
yourMsg=MsgBox( "Click OK to run the script that constantly presses CAPS =D", 1, "Startup Menu")
if ok then run
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop
so it pops up a msgbox saying " click ok to run the script that constantly presses CAPS =D"
the 1 makes the 2 options of ok and cancel that the bottom
the if ok then run makes it run my custom code below it that constantly presses the CAPSLOCK key.
now the thing i can't figure out is how to make it close WITHOUT running the caps code when the CANCEL button is pressed :D
thanks for any help....
so far i have made this code:
yourMsg=MsgBox( "Click OK to run the script that constantly presses CAPS =D", 1, "Startup Menu")
if ok then run
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop
so it pops up a msgbox saying " click ok to run the script that constantly presses CAPS =D"
the 1 makes the 2 options of ok and cancel that the bottom
the if ok then run makes it run my custom code below it that constantly presses the CAPSLOCK key.
now the thing i can't figure out is how to make it close WITHOUT running the caps code when the CANCEL button is pressed :D
thanks for any help....