home *** CD-ROM | disk | FTP | other *** search
- L_Welcome_MsgBox_Message_Text = "This script demonstrates DameWare Base64 Encoder/Decoder using the Windows Scripting Host."
- L_Welcome_MsgBox_Title_Text = "DameWare Windows Scripting Host Sample"
- CrLf = chr(13) & chr(10)
- MyTab = chr(9)
-
- Call Welcome()
-
- Dim DCtl1
- Set DCtl1 = Wscript.CreateObject("DameWare.Base64Ctl.1")
-
- Dim strTextToEncode, strEncodedResult, strDecodedResult
-
- Call RunIt()
-
- MsgBox "String to Encode: " & CrLf & CrLf & _
- strTextToEncode & CrLf & CrLf & CrLf & CrLf & _
- "Encoded Result String: " & CrLf & CrLf & _
- strEncodedResult & CrLf & CrLf & CrLf & CrLf & _
- "Decoded Result String: " & CrLf & CrLf & _
- strDecodedResult
-
- Set DCtl1 = Nothing
-
- Sub RunIt()
- strTextToEncode = "This is a sample string used to demonstrate the Base64 Encoding and Decoding."
-
- DCtl1.DecodedString = strTextToEncode
- DCtl1.Encode
- strEncodedResult = DCtl1.EncodedString
-
- strDecodedResult = ""
- DCtl1.EncodedString = strEncodedResult
- DCtl1.Decode
- strDecodedResult = DCtl1.DecodedString
- End Sub
-
- Sub Welcome()
- Dim intDoIt
-
- intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
- vbOKCancel + vbInformation, _
- L_Welcome_MsgBox_Title_Text )
- If intDoIt = vbCancel Then
- WScript.Quit
- End If
- End Sub