Forums → Programming Forum → VBScripts and/or JavaScripts... Paste examples here
30 | 7711 |
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
7.Dim MyValue, Response
Randomize
Do Until Response = vbNo
MyValue = Int((6 * Rnd) + 1)
MsgBox MyValue
Response = MsgBox ("Roll again? ", vbYesNo)
Loop
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
You're Welcome...
Qwerty001