Discuss Scratch

marcusmario
Scratcher
79 posts

Microsoft Visual Basic

Hey, its Marcus. I've been really caught up with Visual Basic over the past week or so, and it's great. I don't have the actual program so I was just using notepad. One awesome thing i've learned is that it can run batch commands, which is awesome. I actually made this script which is pretty funny (file name is marcus.vbs)
X=Msgbox(“Marcusmario was here”,0+64,“Hi”)

CreateObject(“WScript.Shell”).run(“marcus.vbs”)
which essentially makes an annoying message box you cannot get rid of. I know there is one that is inclosable, but you can exit the .vbs from task manager, but with this script you cannot close it ever (unless logging out). Another way to be really annoying is with something like this:
CreateObject(“WScript.Shell”).run(“marcus.vbs”)

CreateObject(“WScript.Shell”).run(“marcus.vbs”)

CreateObject(“WScript.Shell”).run(“marcus.vbs”)

CreateObject(“WScript.Shell”).run(“marcus.vbs”)

X=Msgbox(“Marcusmario was here”,0+64,“Hi”)

CreateObject(“WScript.Shell”).run(“marcus.vbs”)
which basically runs the file infinite times and makes infinite inclosable messages. I also made one that uses
WScript.Sleep 10000
which makes the program wait 10 seconds before advancing the script and then doing something annoying. Anyway, this has just been a little vbs help. I'd like to see any commands you guys have been using in .vbs!
lugga
Scratcher
500+ posts

Microsoft Visual Basic

Hi!
It is good you are using Visual Basic, however there are multiple versions of Visual Basic.
The one you are using is VBS or Visual Basic Script

Other noteworthy versions are
VBA (Visual Basic for Applications), VB.NET (Visual Basic dot NET), VB for DOS (Visual Basic for DOS), VB6 (Visual Basic 6)

They are all completely different from each other.

Also the code
CreateObject("WScript.Shell").run("marcus.vbs")

CreateObject("WScript.Shell").run("marcus.vbs")

CreateObject("WScript.Shell").run("marcus.vbs")

CreateObject("WScript.Shell").run("marcus.vbs")

X=Msgbox("Marcusmario was here",0+64,"Hi")

CreateObject("WScript.Shell").run("marcus.vbs")

should be

wsh = CreateObject("WScript.Shell")

wsh.run("marcus.vbs")

wsh.run("marcus.vbs")

wsh.run("marcus.vbs")

wsh.run("marcus.vbs")

X=Msgbox("Marcusmario was here",0+64,"Hi")

wsh.run("marcus.vbs")

Last edited by lugga (Jan. 14, 2017 10:41:18)

marcusmario
Scratcher
79 posts

Microsoft Visual Basic

lugga wrote:

Hi!
It is good you are using Visual Basic, however there are multiple versions of Visual Basic.
The one you are using is VBS or Visual Basic Script

Other noteworthy versions are
VBA (Visual Basic for Applications), VB.NET (Visual Basic dot NET), VB for DOS (Visual Basic for DOS), VB6 (Visual Basic 6)

They are all completely different from each other.

Also the code
CreateObject("WScript.Shell").run("marcus.vbs")

CreateObject("WScript.Shell").run("marcus.vbs")

CreateObject("WScript.Shell").run("marcus.vbs")

CreateObject("WScript.Shell").run("marcus.vbs")

X=Msgbox("Marcusmario was here",0+64,"Hi")

CreateObject("WScript.Shell").run("marcus.vbs")

should be

wsh = CreateObject("WScript.Shell")

wsh.run("marcus.vbs")

wsh.run("marcus.vbs")

wsh.run("marcus.vbs")

wsh.run("marcus.vbs")

X=Msgbox("Marcusmario was here",0+64,"Hi")

wsh.run("marcus.vbs")
Alright, thanks for the tips! I've worked with DOS before to repair a bluescreen, but never Visual Basic wise.
theonlygusti
Scratcher
1000+ posts

Microsoft Visual Basic

marcusmario wrote:

I've worked with DOS before to repair a bluescreen, but never Visual Basic wise.
How on earth did DOS repair a blue screen? That's not possible.
Jonathan50
Scratcher
1000+ posts

Microsoft Visual Basic

theonlygusti wrote:

marcusmario wrote:

I've worked with DOS before to repair a bluescreen, but never Visual Basic wise.
How on earth did DOS repair a blue screen? That's not possible.
I think they mean Windows Command Prompt. DOS doesn't have blue screens

Edit: I guess if they have Windows 1-3 or Windows 95 then they could use DOS to repair their system

Last edited by Jonathan50 (Jan. 19, 2017 00:51:59)

Powered by DjangoBB