Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting


Closed Thread
Thread Tools Rate Thread Display Modes
Old 08-03-2020, 01:08 PM
jdev's Avatar
jdev jdev is offline
VanDyke Technical Support
Join Date: Nov 2003
Location: Albuquerque, NM
Posts: 1,099
Post Example: Ping Host from Selection/Clipboard Using Local Shell Connection

This example script shows how to utilize the "Local Shell" capability of SecureCRT to launch a local 'ping' command for any of the following (in order of precedence):
  1. currently in clipboard, or
  2. currently selected in the terminal window (if the clipboard is empty), or
  3. specified by the individual when prompted (if neither the clipboard nor the selection matches the pattern of a valid host name or IP address).

Download the example script here:

Note: This script requires a version of SecureCRT that supports the Local Shell protocol and will only work on an OS that supports Local Shell connectivity (e.g.: Linux, macOS, and Windows 10 Version 1809 and newer)
#   Last Modified:
#     04 Aug, 2020
#       - If a "Ping" tab already exists, activate and use
#         that tab instead of opening a new tab.
#       - If a tab already exists that was connected with
#         the saved session named with the value of the
#         strLocalShellSessName variable, activate and use
#         that tab instead of opening a new tab.
#     30 Jul, 2020
#       - Initial revision
Attached Files
File Type: txt PingHostFromClipboardOrSelection(LocalShell).py.txt (7.1 KB, 1840 views)
Jake Devenport
VanDyke Software
Technical Support
YouTube Channel: https://www.youtube.com/vandykesoftware
Email: support@vandyke.com
Web: https://www.vandyke.com/support

Last edited by jdev; 08-04-2020 at 10:26 AM.
Closed Thread

example script , hist , ip address , local shell , ping

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 01:47 AM.