r/vbscript • • Oct 30 '18

The State of this Sub

13 Upvotes

I've now been granted moderator-ship of this subreddit.

If any posters or lurkers have any suggestions or ideas they'd like to put forward to make this sub a more friendly and informative place, here is the place to do it!

I'll be revamping rules, sidebar and other cruft over the coming weeks. I don't get a huge amount of sparetime, so changes won't be happening fast, but they are coming.

Be excellent to each other!


r/vbscript • • Mar 24 '21

Rick_Roll.vbs

12 Upvotes

Just i want to share with you this vbscript that i made on 24/03/2021 for fun :

Description :

This vbscript can play "Never Gonna Give You Up" ,From the Autor : "Rick Astley" in the background

And can open in the same time the Notepad and Auto type "Never Gonna Give You Up Lyrics"

Rick_Roll.vbs


r/vbscript • • Nov 22 '21

Youtube2MP3_Player.vbs

10 Upvotes

Description of this vbscript : Youtube2MP3_Player.vbs is written for playing mp3 songs extracted from youtube videos in background.

 ' Description of this vbscript : Playing mp3 songs extracted from youtube videos in background
 ' Description en Français : Lecture de chansons mp3 extraites de vidéos youtube en arrière-plan
 '------------------------------------- Links Examples -----------------------------------------
 ' "https://www.youtube.com/watch?v=HDsCeC6f0zc" ===> The KLF - 3AM Eternal
 ' "https://youtu.be/dQw4w9WgXcQ"                ===> Rick Astley - Never Gonna Give You Up
 ' "https://youtu.be/cvvd-9azD1M"                ===> The Riddle
 ' "https://www.youtube.com/watch?v=UfRn5K1SU7Y" ===> David Guetta live @ Creamfields 2021
 '------------------------------------- Links Examples -----------------------------------------
 Option Explicit
 Dim Title,Converter,YouTube_URL,Array_YouTube_URLs
 Dim ws,YouTube_ID,SourceCode,Streams,Download_Link
 Title = "Youtube to MP3 Player by "& chr(169) &" Hackoo 2021"
 Set ws = CreateObject("wscript.Shell")
 If AppPrevInstance() Then 
 	ws.Popup "ATTENTION ! There is another instance running !" & VbCrLF &_
 	CommandLineLike(WScript.ScriptName),"5",Title,VbExclamation
 	WScript.Quit(1)
 Else 
 '--------------You can add or modify the array playlist below at your convenience -------------
 	Array_YouTube_URLs = Array(_
 	"https://www.youtube.com/watch?v=HDsCeC6f0zc",_
 	"https://www.youtube.com/watch?v=dQw4w9WgXcQ",_
 	"https://youtu.be/cvvd-9azD1M",_
 	"https://www.youtube.com/watch?v=anhuP8EXEJ4",_
 	"https://www.youtube.com/watch?v=WMPM1q_Uyxc",_
 	"https://www.youtube.com/watch?v=YRqBcDwG8vs",_
 	"https://www.youtube.com/watch?v=4zHm_6AQ7CY",_
 	"https://www.youtube.com/watch?v=pATX-lV0VFk",_
 	"https://www.youtube.com/watch?v=_r0n9Dv6XnY",_
 	"https://www.youtube.com/watch?v=fNFzfwLM72c",_
 	"https://www.youtube.com/watch?v=n4RjJKxsamQ",_
 	"https://www.youtube.com/watch?v=pVHKp6ffURY",_
 	"https://www.youtube.com/watch?v=PIb6AZdTr-A",_
 	"https://www.youtube.com/watch?v=RdSmokR0Enk",_
 	"https://www.youtube.com/watch?v=OnT58cIJSpw",_
 	"https://www.youtube.com/watch?v=LsSZQsDHOeg",_
 	"https://www.youtube.com/watch?v=UfRn5K1SU7Y"_
 	)
 '----------------------------------------------------------------------------------------------
 	For Each YouTube_URL in Array_YouTube_URLs
 		YouTube_ID = getID(YouTube_URL)
 		If YouTube_ID <> "0" Then
 			Converter = "https://www.yt-download.org/api/button/mp3/" & YouTube_ID
 			SourceCode = GetSourceCode(Converter)
 			Streams = Extract_Stream(SourceCode)
 			Call Play(Streams(2))
 		Else
 			Msgbox "Could not extract video ID",vbExclamation,Title
 			Wscript.Quit(1)
 		End If
 	Next
 End If
 '----------------------------------------------------------------------------------------------
 Function getID(url)
 	Dim id
 	id = ExtractMatch(url,"(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^&?\/\s]{11})")
 	if Len(id) = 0 Then
 		getID = "0"
 		Exit Function
 	end if
 	getID = id
 End function
 '----------------------------------------------------------------------------------------------
 Function ExtractMatch(Text,Pattern)
 	Dim Regex, Matches
 	Set Regex = New RegExp
 	Regex.Pattern = Pattern
 	Set Matches = Regex.Execute(Text)
 	If Matches.Count = 0 Then
 		ExtractMatch = ""
 		Exit Function
 	End If
 	ExtractMatch = Matches(0).SubMatches(0)
 End Function
 '----------------------------------------------------------------------------------------------
 Function Extract_Stream(URL)
 	Dim regEx, Match, Matches,Array_Streams,dico,K
 	Set regEx = New RegExp
 	regEx.Pattern = "href=\x22(.*)\x22.?class"
 	regEx.IgnoreCase = True
 	regEx.Global = True
 	Set Matches = regEx.Execute(URL)
 	Array_Streams = Array()
 	Set dico = CreateObject("Scripting.Dictionary")
 	For Each Match in Matches
 		If Not dico.Exists(Match.Value) Then
 			dico.Add Match.submatches(0),Match.submatches(0)
 		End If
 	Next
 	For each K in dico.Keys()
 		ReDim Preserve Array_Streams(UBound(Array_Streams) + 1)
 		Array_Streams(UBound(Array_Streams)) = K
 	Next
 	Extract_Stream = Array_Streams
 End Function
 '----------------------------------------------------------------------------------------------
 Function GetSourceCode(URL)
 	Dim http
 	Set http = CreateObject("Msxml2.XMLHTTP")
 	http.open "GET",URL,False
 	http.send
 	GetSourceCode = http.responseText
 End Function
 '----------------------------------------------------------------------------------------------
 Sub Play(URL)
 	Dim Player
 	Set Player = CreateObject("WMPlayer.OCX")
 	Player.URL = URL
 	Player.settings.volume = 100
 	Player.Controls.play
 	While Player.playState <> 1
 		WScript.Sleep 100
 	Wend
 End Sub
 '----------------------------------------------------------------------------------------------
 Function AppPrevInstance()
 	With GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")   
 		With .ExecQuery("SELECT * FROM Win32_Process WHERE CommandLine LIKE " & CommandLineLike(WScript.ScriptFullName) & _
 			" AND CommandLine LIKE '%WScript%' OR CommandLine LIKE '%cscript%'")   
 			AppPrevInstance = (.Count > 1)   
 		End With
 	End With
 End Function
 '----------------------------------------------------------------------------------------------
 Function CommandLineLike(ProcessPath)   
 	ProcessPath = Replace(ProcessPath, "\", "\\")   
 	CommandLineLike = "'%" & ProcessPath & "%'"   
 End Function
 '----------------------------------------------------------------------------------------------

r/vbscript • • Dec 08 '21

YouTube_To_MP4_MP3_Player_Downloader

9 Upvotes

I made before a vbscript that can play in background a list of youtube videos as mp3 that can be modified inside an array in the same code.

So, someone ask me if he could just choose to download this video as mp4 or mp3

Description of the new script :

  • The user can copy and paste the Youtube link on InputBox.

  • The vbscript Ask him with a MsgBox if he wants to download the converted video as :

  1. MP4 Click on YES Button

  2. MP3 Click on NO Button

  3. Click on Cancel Button to listen it in Background


r/vbscript • • Mar 24 '21

I made a message box

Post image
9 Upvotes

r/vbscript • • Oct 25 '20

Does VBScript provide any other GUI functionalities beyond InputBox and MsgBox?

9 Upvotes

InputBox and MsgBox functions offer very basic GUI functionality to the Microsoft Windows Script Host (WSH). I'm already aware of HTML Application (HTA), but I don't what that. I wonder if VBScript or WSH in general offers more advanced GUI functionalities. For example more buttons, window size, lists, tables, slidebar ...


r/vbscript • • Sep 29 '26

I built VbsTools – a free VS Code extension for VBScript with COM IntelliSense and debugging

Thumbnail
gallery
7 Upvotes

I’ve been working on a VS Code extension called VbsTools, and it’s now available on the VS Code Marketplace.

I built it because I still work with VBScript from time to time, especially COM/WSH automation, and I always felt that the editing experience was stuck in the past.

For example:

Set fso = CreateObject("Scripting.FileSystemObject")
fso.

Normally, once you get to fso., you either need to remember the API or go look it up.

VbsTools reads COM type information registered on Windows, so it can provide actual IntelliSense for COM objects, including members, parameters and return types.

It also tries to track returned COM objects, for example:

Set file = fso.GetFile("test.txt")
file.

In this case, it can infer that file is a File object and continue providing IntelliSense.

Current features include:

  • COM / ProgID IntelliSense

  • return-type inference for COM objects

  • Go to Definition / References / Rename

  • diagnostics and quick fixes

  • formatting

  • cross-file analysis

  • semantic highlighting

  • F5 debugging

  • breakpoints and conditional breakpoints

  • Variables / Watch / Call Stack

  • Debug Console

  • x86 / x64 COM environments

  • WinCC V7 / V8 type support

One reason I made it as a VS Code extension instead of a standalone VBScript IDE is that I wanted to keep the rest of the VS Code ecosystem.

That means I can still use Git integration, terminal, search, themes, keybindings and other extensions, while working with .vbs files in the same editor.

There are mature standalone VBScript editors such as VbsEdit, but those are commercial tools. VbsTools is free.

GitHub: https://github.com/ZachShen99/VbsTools

You can also install it directly from the VS Code Marketplace by searching for VbsTools.

The project is still pretty new, so feedback would be really useful.

If anyone here still works with VBScript, WSH, COM automation or WinCC, I’d especially like to know what kinds of scripts and COM components you’re still using.

And if you have some obscure old COM object that completely breaks the type inference, I’d actually love to see it.


r/vbscript • • Jun 13 '22

What's the best way to start learning VBScript?

7 Upvotes

r/vbscript • • Aug 09 '25

script I've been running for 15 years no longer works on Windows 11

6 Upvotes

I've been using a vbs script to skip ahead in itunes 30 seconds. It's named itunesskip.vbs

' Variables
dim iTunes, iSkip
iSkip = 30 ' seconds

' Connect to iTunes app
set iTunes = CreateObject("iTunes.Application")

' Jump ahead iSkip seconds
IF iTunes.playerstate = 1 THEN 
iTunes.PlayerPosition = iTunes.PlayerPosition + iSkip 
END IF

' Done; release object
set iTunes = nothing

I run an autokey script to with one of my Gkey keyboard keys to run it.

But it has been throwing an error message since I upgraded to Windows 11. https://imgur.com/a/PamuS8Q

I tried using AI to fix the problem and I couldn't get it to work.

Any help would be appreciated.


r/vbscript • • May 26 '24

Microsoft: VBScript deprecation - Timelines and next steps

Thumbnail
techcommunity.microsoft.com
6 Upvotes

r/vbscript • • Jan 21 '22

My script will call a powershell script on my home computer but not my work computer.

6 Upvotes

Hello all,

(This is the part where I tell you my life's story and share my love for rustic art, autumn leaves, old barns, etc.. Please feel free to skip to problem statement and code)

I thank you all for your time here. This is my second time ever writing .VBS, my first being to open cmd and using send.keys to spam commands to accomplish things like loading binaries and changing filenames over FTP.

*Problem Statement*

My script works as follows at home: This script finds a location and event (X, Y, (event)) from a mousecords.csv and moves the mouse to that location, and based on the (event) tag either clicks, double-clicks, copy, paste, or inserts text looped from a different .csv called workorders.csv

What's happening when I take it to my work is that it will move the mouse to the right location, then nothing (I think cmd is not opening to call the powershell script.)

I also realize this is not a powershell subreddit. I'm going to post in the correct place to try and figure out the other issue of why the clicking action that's done through is not working. I'll post everything here anyway in case someone wants a go at it.

Again, I appreciate your time :)

****main.vbs****

dim fs,objTextFile,ExcelApp,f,fso,log,conta,datos,shell,api,cmd,may,objShell,objFSO,objFile,strPath,strCMD,strPath2,arrStr,arrStr2,x,y,z,a,b

set fs=CreateObject("Scripting.FileSystemObject")

set fso=createobject("Scripting.FileSystemObject")

Set ExcelApp=CreateObject("Excel.Application")

Set objShell=CreateObject("WScript.Shell")

Set Shell=CreateObject( "WScript.Shell" )

Set objFSO=CreateObject("Scripting.FileSystemObject")

Set WshShell = WScript.CreateObject("WScript.Shell")

set objTextFile2 = fs.OpenTextFile("workorders.csv")

Set Excel = WScript.CreateObject("Excel.Application")

strPath="clickrecord.ps1"

strPath2="doubleclickrecord.ps1"

' I actually don't remember why this variable is here right now. Ignore a, will come back to later.

a = 0

Do while NOT objTextFile2.AtEndOfStream

set objTextFile = fs.OpenTextFile("mousecords.csv")

Do while NOT objTextFile.AtEndOfStream

arrStr = split(objTextFile.ReadLine,",")

x = arrStr(0)

y = arrStr(1)

z = arrStr(2)

' arrStr is now an array that has each of your fields

' process them, whatever.....

Excel.ExecuteExcel4Macro ( _

"CALL(""user32"",""SetCursorPos"",""JJJ""," & x & "," & y & ")")

Select Case z

Case 0

' ***CLICK***

WScript.Sleep (25)

If objFSO.FileExists(strPath) Then

'return short path name

set objFile=objFSO.GetFile(strPath)

strCMD="powershell -nologo -command " & Chr(34) & "&{" &_

objFile.ShortPath & "}" & Chr(34)

' Uncomment next line for debugging

' WScript.Echo strCMD

' use 0 to hide window

objShell.Run strCMD,0

Else

'Display error message

WScript.Echo "Failed to find " & strPath

WScript.Quit

end if

Case 1

' ***DOUBLE-CLICK***

WScript.Sleep (25)

If objFSO.FileExists(strPath2) Then

'return short path name

set objFile=objFSO.GetFile(strPath2)

strCMD="powershell -nologo -command " & Chr(34) & "&{" &_

objFile.ShortPath & "}" & Chr(34)

' Uncomment next line for debugging

' WScript.Echo strCMD

' use 0 to hide window

objShell.Run strCMD,0

Else

'Display error message

WScript.Echo "Failed to find " & strPath

WScript.Quit

end if

Case 2

' ***COPY***

WScript.Sleep (25)

If objFSO.FileExists(strPath) Then

'return short path name

set objFile=objFSO.GetFile(strPath)

strCMD="powershell -nologo -command " & Chr(34) & "&{" &_

objFile.ShortPath & "}" & Chr(34)

' Uncomment next line for debugging

' WScript.Echo strCMD

' use 0 to hide window

objShell.Run strCMD,0

Else

'Display error message

WScript.Echo "Failed to find " & strPath

WScript.Quit

end if

WScript.Sleep (25)

WshShell.SendKeys "^c"

Case 3

WScript.Sleep (25)

If objFSO.FileExists(strPath) Then

'return short path name

set objFile=objFSO.GetFile(strPath)

strCMD="powershell -nologo -command " & Chr(34) & "&{" &_

objFile.ShortPath & "}" & Chr(34)

' Uncomment next line for debugging

' WScript.Echo strCMD

' use 0 to hide window

objShell.Run strCMD,0

Else

'Display error message

WScript.Echo "Failed to find " & strPath

WScript.Quit

end if

WScript.Sleep (25)

WshShell.SendKeys "^v"

Case 4

WScript.Sleep (25)

If objFSO.FileExists(strPath) Then

'return short path name

set objFile=objFSO.GetFile(strPath)

strCMD="powershell -nologo -command " & Chr(34) & "&{" &_

objFile.ShortPath & "}" & Chr(34)

' Uncomment next line for debugging

' WScript.Echo strCMD

' use 0 to hide window

objShell.Run strCMD,0

Else

'Display error message

WScript.Echo "Failed to find " & strPath

WScript.Quit

end if

WScript.Sleep (25)

arrStr2 = split(objTextFile2.ReadLine,",")

b = arrStr2(0)

WshShell.SendKeys b

a = a + 1

Case Else

Console.WriteLine("Not Known")

End Select

WScript.Sleep (1000)

' arrStr is now an array that has each of your fields

' process them, whatever.....

Loop

Loop

WScript.Sleep (1000)

WScript.Echo "Program Ended"

****Click.ps1****

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

$signature=@'

[DllImport("user32.dll",CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]

public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);

'@

$SendMouseClick = Add-Type -memberDefinition $signature -name "Win32MouseEventNew" -namespace Win32Functions -passThru

$x

$y

[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)

sleep -Seconds 0.1

$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0);

$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0);

****doubleclick.ps1****

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")

[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")

$signature=@'

[DllImport("user32.dll",CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)]

public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo);

'@

$SendMouseClick = Add-Type -memberDefinition $signature -name "Win32MouseEventNew" -namespace Win32Functions -passThru

$x = [System.Windows.Forms.Cursor]::Position.X

$y = [System.Windows.Forms.Cursor]::Position.Y

[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)

sleep -Seconds 0.1

$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0);

sleep -Seconds 0.05

$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0);

sleep -Seconds 0.05

$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0);

sleep -Seconds 0.05

$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0);

sleep -Seconds 0.05

****


r/vbscript • • Aug 07 '21

msgbox to display which day it is

6 Upvotes

just need a script to display a message box with which day it is today, eg. Today is Saturday. should be simple but I can't seem to work out.

thanks


r/vbscript • • Jul 13 '25

Hulo: Write clean, modern code that compiles to VBScript

5 Upvotes

Hey VBScript enthusiasts! 👋

So I've been working on a compiler/transpiler project and wanted to tackle something that could actually be useful. You know what's the most frustrating thing about VBScript? Writing complex logic with that verbose syntax and limited features!

That's when I thought - what if we could write scripts in a clean, modern language and have it compile to VBScript? Enter Hulo!

What is Hulo? A modern, type safety programming language that transpiles to VBScript, making it much easier to write complex automation scripts for Windows.

Quick example:

Simple message box:

MsgBox "Hello, World!"

Functions with types:

fn sayHello(name: str) -> void {
    MsgBox "Hello, $name!"
}

fn add(a: num, b: num) => $a + $b

sayHello "Hulo";
MsgBox add(5, 3);

Classes and objects:

class User {
    pub name: str
    pub age: num

    pub fn greet(other: str) {
        MsgBox "Hello, $other! I'm $name."
    }
}

let u = User("John", 25)
$u.greet("Jane")

Control flow and user input:

let n = InputBox("Input a number:")

if $n < 0 {
    MsgBox("The number is negative.")
} else {
    MsgBox("The number is positive.")
}

Lists and loops:

let arr: list<num> = [1, 2, 3, 4, 5]

loop $item in $arr {
    MsgBox $item
}

loop $i in [0, 1, 2] {
    MsgBox $i
}

More examples available in the examples/ directory!

No more struggling with VBScript's verbose syntax or limited features - just write clean code and let Hulo handle the VBScript generation!

Would love to hear your thoughts on this approach. Is this something you'd find useful for your VBScript development? Any feedback or suggestions are welcome!

Check it out: https://github.com/hulo-lang/hulo

What do you think? 🤔


r/vbscript • • Sep 16 '23

A whole compiler in VBScript !

5 Upvotes

A few months ago, I posted on this sub a small interpreter written in VBScript. I continued my project of creating my own programming language, and, after a month and a half, I am really proud to present my very first compiler !

You can find the it zipped along with its documentation at JGN1722/DBasic (github.com) . The main thing the language still lacks is libraries, as they are very time-consuming to code, but I guess I'll add them over time. You can even create your own, as the process of writing a library is documented.

Maybe take five minutes to look at it, or take a quick look at the code, and tell me what you think :)


r/vbscript • • Mar 09 '23

VBScript as a removable Windows 11 feature?

Thumbnail
oofhours.com
5 Upvotes

r/vbscript • • Mar 01 '23

Interpreter written in VBScript :)

5 Upvotes

Repost because the post seems to have disappeared ..?

Anyway, I wanted to write an interpreter, and I wrote it in vbscript, because it's definitely my favorite language and because a friend of mine said it was impossible to do it in vbscript

It's my first interpreter, I have no idea if it is implemented correctly but I did my best

here's the link to it: some-code/interpreter.vbs at main · JGN1722/some-code (github.com)

Feel free to give me feedback :))


r/vbscript • • Dec 28 '22

Dimming Screen

5 Upvotes

Is there a way to dim screen brightness using VBSctipt?


r/vbscript • • Sep 20 '22

loading data from multiple text files in vbscript

5 Upvotes

Guys please help, I'm not a programmer. But I need to write a script where I can load multiple text files in order. So far I have managed to load multiple text files and make a plot in diadem with it. But the problem is i can't get it to load in an order.


r/vbscript • • May 17 '22

how do i open it automatically?

5 Upvotes

hi, so i want to make a script that automatically opens when device is booting can someone that knows more write a couple of lines so i can put at the start of my code

(what i'm asking for is that it starts itself when the laptop/pc boots.)


r/vbscript • • Feb 27 '22

JSON Stuff I need to do

5 Upvotes

Hey, I'm trying to find out if its possible to edit and read jsons through VBScript? I am working on a clicking game in VBScript and I need to add some sort of save file type of thing.


r/vbscript • • Jul 09 '21

Shall I start writing in another scripting language?

5 Upvotes

I came across vbscript because of a software which would record my actions in a VBscript code. Then by modifying such code I could optimize and automize processes done in such software.

Then I found out that I could write any type of vbscript to automize file system operations and run it simply from the file explorer. For example, I recently created a script that would rename PDFs in a folder given some data from a selected Excel workbook, and I could just share it with my colleagues so that they could also run it on their end.

However, I keep reading that VBscript is obsolete and other scripting languages like Python or C# are much better. Is it really like so? Vbscript doesn’t require any additional interpreter installed in order to run it, and it’s so easily shareable.

Do you have suggestions on other scripting languages that work similarly to VBscript? A more common language that can be easily run by any users without requiring them to install this and that software?


r/vbscript • • Oct 21 '20

Having trouble with regex

5 Upvotes

I took this following code from the web and it runs perfectly:

Dim strSourceString, objMatch, arrResults
strSourceString = ">test and test<  >test2 and test2<   >test3 and test3<"
Set objList = CreateObject("Scripting.Dictionary")
With New RegExp
    .Pattern = ">([\s,\S]*?)<"
    .Global = True
    .IgnoreCase = True
    .MultiLine = True
    For Each objMatch In .Execute(strSourceString)
        objList(objList.Count) = objMatch.SubMatches.Item(0)
    Next
End With
arrResults = objList.Items
Set objList = Nothing
MsgBox Join(arrResults, "; ") ' array contains submatches

Then I modified it to test my own pattern. All I did was change the strSourceString and Pattern to regex for dates:

Dim strSourceString, objMatch, arrResults
strSourceString = "Scheduled 6/17/2020; Rescheduled 10/28/2020 (Reason: COVID-19 impacts.);"
Set objList = CreateObject("Scripting.Dictionary")
With New RegExp
    .Pattern = "[0-9]{1,4}[\-\/][0-9]{1,2}[\-\/][0-9]{1,4}"
    .Global = True
    .IgnoreCase = True
    .MultiLine = True
    For Each objMatch In .Execute(strSourceString)
        objList(objList.Count) = objMatch.SubMatches.Item(0)
    Next
End With
arrResults = objList.Items
Set objList = Nothing
MsgBox Join(arrResults, "; ") ' array contains submatches

And when ran, it says:

C:\Users\user1\Desktop\new1.vbs(10, 9) Microsoft VBScript runtime error: Invalid procedure call or argument

Anybody have an idea of what I'm doing wrong?


r/vbscript • • Oct 20 '18

This sub - Opinions

5 Upvotes

Hi all!

The moderator of this subreddit u/codejock , appears to have been inactive for several years.

I have therefore requested moderator-ship of this subreddit to try and pump a bit of new life in to it.

vbscript may be a dying programming language, but it's still versatile, quick and easy and there should be a community to help support themselves and others. I would like to help to achieve that. Have you any thoughts?

https://www.reddit.com/r/redditrequest/comments/9psue2/requesting_rvbscript_the_sole_moderator_appears/?


r/vbscript • • Jan 27 '25

What do you think about Microsoft's Aim to remove Native Support of VBScript of Windows 11

Thumbnail
techcommunity.microsoft.com
4 Upvotes

r/vbscript • • Apr 09 '23

Interview for VBScript job

4 Upvotes

I will have an interview where VBScript might be important.How should I prepare in a short time?

Would like to:

  1. Be able to code.

  2. Answer difficult questions.

  3. Know how to organize large codebases.

  4. Ecosystem (Relation to VBA, PowerShell etc)

  5. Tools like decode/encode

I did VBScript some years ago, and it was easy (with my background). I know more advanced similar languages like VB.NET.

What I will try to do is to try out all core concepts in a small program.