Sample scripts

SecureCrt

Download securecrt.tlb type library


# $language = "VBScript"
# $interface = "1.0"

'library:c:\mytypelib\securecrt.tlb
'Dim crt As SecureCrt.crt

' The Dialog object's Prompt() function takes 4 parameters listed in order:
'
' prompt text - Informational prompt message to users. This parameter is
'               mandatory.
'
' title       - A title or caption for the prompt window. This parameter 
'               is optional and defaults to the application name.
'
' default     - A default string that will be displayed in the edit box.
'               This parameter is optional and defaults to an empty string. 
'
' ispasswd    - A boolean value. If True, this parameter causes edit text
'               to be visibly obscured. This parameter is optional and 
'               defaults to False.

Sub main

  Dim result

  ' Supply only the prompt text, accept defaults for everything else.
  '
  result = crt.Dialog.Prompt("Here is the prompt text")

  ' Prompt by supplying all of the parameters
  '
  result = crt.Dialog.Prompt("Here is the prompt text", "My Caption", "Default edit text", False)

  ' Note: Prompt() always returns the edit box text if the user clicks OK. 
  ' It always returns an empty string if the user cancels...
  '
  crt.Dialog.MessageBox"You entered: " & result

  ' Prompt for a password and obscure the edit box text.
  '
  result = crt.Dialog.Prompt("Enter your password", "Login", "", True)

EndSub


VbsEdit provides Intellisense for SecureCRT!


Download Now!



Home  

Copyright © 2001-2024 adersοft