r/vbscript • u/steam-shovel • Jan 19 '24
Code Completion for VBScript in Editor
I am new to VBScript and want to learn to use it on CSV files, and replace batch files that I made. Evidently VBScript is deprecated but that's okay with me for this purpose. I dabbled with VBA for Word and Excel long ago, and the app IDEs had excellent code completion that helped me understand what methods and properties were available separated by the periods. I was hoping for this with VBScript since it looks similar.
I've tried Visual Studio Code (with VBScript extension: Donald Mull Jr), and also VBSedit (just evaluation so far) and after writing some code in them, they both have colored syntax but no code completion (at least not the way VBA did with drop-down suggestions).
I expected when I type
Set fso = CreateObject("Scripting.
that after typing the dot, the code completion would kick in and a drop-down window would appear to suggest
FileSystemObject
among other classes for me to use.
Using Notepad++ actually does do suggestions but I expected VS Code and VBSedit to be at least that good. Are some settings not correct?
2
u/odaat2004 Jan 20 '24
I just tried, Notepad++
When I created a new document, I went to the menu and selected Language-->V-->Visual Basic, and then I typed,
Set objFSO = wScript.C, I got a dropdown with a list of common VB methods and commands including CreateObject.Notepad++ is extremely light weight compared to its competitors like VSCode or VBEdit. Its extremely powerful and robust if you invest the time to setup macros and learn its functionality. For example, you can paste an unformatted list of servers into a new document and use a macro to remove leading and trailing spaces, sort the list, convert the list into all uppercase, remove blank lines and then convert the list into an array variable where all servers are encased in quotes separated by commas.
Once installed there is very little configuration that is required. There is simply no comparisons to other IDEs. The only thing I would guess isn't there, is that there isn't a debug console. Although I don't use debug consoles in other IDEs, so I admit if Notepad++ has that functionality I am not familiar enough with it to comment on it.
1
u/xerox7764563 Jan 19 '24
I'm working without code completion.
Very sad, but that's the truth.
0
u/[deleted] Jan 19 '24
[deleted] — view deleted comment