This user's guide explains the essentials of using VBScript in SecureCRT for Windows to help you accomplish more work in less time.
Major sections are "Starting from scratch with a new script," "Recording a script using the SecureCRT Script Recorder," and "Modifying an existing example script."
The second chapter addresses manual and automated methods for launching scripts. For automated execution, ways to pass arguments that allow changing the script behavior are also described.
This chapter first introduces two of the most common methods used in SecureCRT scripting to connect to one or more devices from within a script: Connecting with a preconfigured session, or Connecting in an ad hoc fashion. The chapter also explains how to establish multiple connections within tabs, including how to open a group of sessions in separate tabs within the same instance of SecureCRT.
Chapter 4 details techniques that relate to waiting for specific data from a remote machine and capturing it when it arrives. Also included are two examples with full source code: performing a web search with selected text, and receiving notification when "error-indicating" text appears.
Sending data to a remote device is a fairly straight-forward task once you have an assurance that the remote machine is ready to receive data. In this chapter, you'll learn how to send plain text as well as non-printing control codes. You'll also learn how to simulate keyboard events to simplify automating tasks that involve function keys or mapped keyboard combinations defined within a keymap file or session options.
This chapter presents functions that allow you to prompt end users for information and provides examples of how to do simple input validation. For more complex requirements, the chapter includes an example of prompting for information by means of an on-the-fly custom dialog created using the InternetExplorer.Application ActiveX object.
Whether you are saving a history of commands entered for auditing purposes, reading in fields from a CSV file, or backing up a Cisco router, you may at some point need to write data to or read data from a file. This chapter introduces the logging methods provided by SecureCRT's Session object. Techniques for reading and writing data from and to files using VBScript's built-in FileSystemObject and its related objects and methods are also discussed.
The ability to easily work with data from a variety of applications is often a "must have". If you store commands, code, or configuration data within another application and need to frequently transfer portions of this information to a remote device using SecureCRT, the Clipboard object can be used to access text that has been copied to the Windows Clipboard.
Here you can control cookies using the checkboxes below. Some cookies are essential for the use of our website and cannot be disabled. Others provide a convenience to the user and, if disabled, may reduce the ease of use of our site. Finally, some cookies provide anonymous analytic tracking data that help us provide the user with a richer browsing experience. You can elect to disable these cookies as well.