-
Notifications
You must be signed in to change notification settings - Fork 0
vattay/vbsProcaine
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
vbsProcaine *Intent Create a collection of code snippets, functions, and classes to numb the aggravating pain of starting a complex VBScript project. *Reason Yes, the real problem is "Why are you using vbScript to do anything complex?" Some of us work in evironments of idiots, by idiots, for idiots with remarkably unresponsive change control processes and outdated systems. So we are stuck with this simpleton of a language, vbScript. This is the paper mache of the programming world. *Status To call this "Alpha" would be an incredible overstatement. *Pre-Reqs -Windows (Duh) -Windows Script Host -The "include" hack needed to enable libraries. *Instructions 1. Paste the include emulator in your code. 2. Call "Include(<some_file_path>)" to include a library in your code. 3. Use library functions and classes. 'PASTE THIS IN YOUR CODE THAT NEEDS TO INCLUDE LIBS------------------------- ' -------------------------------------------------------------------------- ' VBScript "Include" emulator ' -------------------------------------------------------------------------- Sub Include(sInstFile) On Error Resume Next Dim oFSO, f, s Set oFSO = CreateObject("Scripting.FileSystemObject") If oFSO.FileExists(sInstFile) Then Set f = oFSO.OpenTextFile(sInstFile) s = f.ReadAll f.Close ExecuteGlobal s End If Set oFSO = Nothing Set f = Nothing End Sub ' -------------------------------------------------------------------------- *Caveats Debugging a library is impossible using it in an included manner, errors always are reported to be on the include line. Write a test driver function in the library to test it. *Props DeekGeek for posting the include emulator on DZone License GNU GPL v3 FTW
About
A library to numb the pain of working with vbScript
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published