VBScript Pseudo-Reflection(?) [modified]
-
Is it possible for a VBScript (i.e. test.vbs) to actually know it is called "test.vbs"? I seem to recall something in VB Using "Application" "object" for finding out that kind of stuff. ~Mike Stanbrook
modified on Saturday, January 22, 2011 10:21 AM
-
Is it possible for a VBScript (i.e. test.vbs) to actually know it is called "test.vbs"? I seem to recall something in VB Using "Application" "object" for finding out that kind of stuff. ~Mike Stanbrook
modified on Saturday, January 22, 2011 10:21 AM
WScript.Echo WScript.ScriptName
RageInTheMachine9532
-
WScript.Echo WScript.ScriptName
RageInTheMachine9532
Thanks. ~Mike Stanbrook
-
Is it possible for a VBScript (i.e. test.vbs) to actually know it is called "test.vbs"? I seem to recall something in VB Using "Application" "object" for finding out that kind of stuff. ~Mike Stanbrook
modified on Saturday, January 22, 2011 10:21 AM
Adding a related question to this thread: Assuming you don't know it (all or at all) after importing VBScript code, or instantiating a COM object, is there any way to get a list of methods (and perhaps properties) of a VBScript class and/or COM object (built from C/C++ or Visual Basic)? Basically something like .NET reflection for VBScript/COM.
"A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible." - Freeman Dyson