|
Answer» Hi Friends, Is there any specified SET or collection of objects and methods used in VBScript ? There certainly should be and if there is, from where I can get that list ? And one question more: the period is only "." or other alphanumerics also ? ThanxAside from the objects supplied by VBScript, each system has it's own set of objects BASED on the applications installed.
Rob Vanderwoude posted this script which lists all available objects on your system.
Code: [Select]Option Explicit Const HKEY_CLASSES_ROOT = &H80000000
Dim arrProgID, lstProgID, objReg, strMsg, strProgID, strSubKey, subKey, subKeys()
Set lstProgID = CreateObject( "System.Collections.ArrayList" ) Set objReg = GETOBJECT( "winmgmts://./root/default:StdRegProv" )
' List all subkeys of HKEY_CLASSES_ROOT\CLSID objReg.EnumKey HKEY_CLASSES_ROOT, "CLSID", subKeys
' LOOP through the list of subkeys For Each subKey In subKeys ' Check each subkey for the existence of a ProgID strSubKey = "CLSID\" & subKey & "\ProgID" objReg.GetStringValue HKEY_CLASSES_ROOT, strSubKey, "", strProgID ' If a ProgID exists, add it to the list If Not IsNull( strProgID ) Then lstProgID.Add strProgID Next
' Sort the list of ProgIDs lstProgID.Sort
' COPY the list to an array (this makes displaying it much easier) arrProgID = lstProgID.ToArray
' Display the entire array WScript.Echo Join( arrProgID, vbCrLf )
Once you decide which object you need, research on the internet will help you with the properties and methods. An editor/ide with intellitype or an object browser is very helpful but is no substitute for the object documentation.
Good luck.
Not all the objects have an interface you can program. You should have the VBScript Help file (script56.chm) on your system already. If not, you can download it here
|