Share this page 

Create and use a classTag(s): WSH VBScript


Dim my_howto

' create an VbsHowTo object and init its properties
Set my_howto = new VbsHowTo
my_howto.create "General", _
                "Start a script", _
                "CSCRIPT to start a script in CONSOLE mode" & vbCRLF & _
                "WSCRIPT to start a script in GUI mode"           

' ---------------------------------------
' class definition to represent an VBScript Howto
Class VbsHowTo
 Dim category
 Dim title
 Dim howto

 Sub create(cat, tit, how)
    category = cat
    title = tit
    howto = how
 End Sub

 Sub print()
   WScript.Echo category & " - " & title
   Wscript.Echo howto
 End Sub

End Class
Thanks to E. Girardet for this tip