-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
51 lines (39 loc) · 1.68 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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