VanDyke Software

Scripting Examples


Set Word Delimiters

By default, SecureCRT uses all non-alphanumeric characters (except underscore) as word delimiters when selecting an entire "word" with a double-click action.

Ever wanted double-click word selection to behave differently depending on the current situation? For example:

  • Sometimes you might want double-click to select everything bounded by spaces.
  • At other times you may want to be able to select a word at the end of a sentence without the trailing period being included with the selection.

SecureCRT's word delimiter functionality can be customized to allow you to word-select text efficiently using the word delimiters that work best for you most of the time. However, what about those times where you need slightly different word selection behavior? You might opine that configuring a new word delimiter character set might be too much overhead for something you may only need for a short period of time.

This example script shows one way of cycling through different delimiter sets for double-click word selection. Simply open SecureCRT's button bar and map a new button to run this script. Every time you run the script, SecureCRT's word delimiters for the active session will change, rotating through five different word delimiter sets — one of which equates to the option being turned off, so that SecureCRT's default word selection behavior is restored.

The script is written in Python, so it should work for you on any platform officially supported by SecureCRT.

Example Script (3.55 KB)

VanDyke Software uses cookies to give you the best online experience. Before continuing to use this site, please confirm that you agree to our use of cookies. Please see our Cookie Usage for details.