![]() |
P6StrLen |
Name: |
P6StrLen |
| Synopsis: | Calculate lengths of strings. |
Version: |
1.30 |
| Author: | David A. Gray, MBA, of Simple Soft Services, Inc., d/b/a P6 Consulting |
Copyright: |
© 1998, 2000, 2003, 2004, P6 Consulting. All rights reserved world wide. |
Syntax: |
The program can be run from a shortcut and operates interactively, displaying a dialog box with a text box into which you enter or paste the string for which you wish to calculate a length. Buttons on the dialog box enable you to easily paste strings into the text box, calculate the length of the string in the text box, and cause the calculated length to be placed on the Windoww Clipboard. |
When you launch the program from a command prompt, a shortcut, or the Windows Explorer, after a few seconds, the dialog box shown in Figure 1 below displays.

Figure 1 - String length calculator, ready to use.
You have four ways to get strings into the calculator.
Figure 2 shows the dialog box with the string "This is a test. This is only a test." typed into the text box.
<
Figure 2 - Program showing string typed into text box.
Conversely, if you paste the text into the program, the dialog box looks like Figure 3.
Figure 3 - Program with string pasted into text box.
When you press the Copy button or its accelerator, ALT-C, the length of the string is calculated and placed on the Windows Clipboard. This action is confirmed by a message box like the one shown in Figure 4.

Figure 4 - String length pasted into Windows Clipboard, showing calculated value.
You are now free to paste the string length into your favorite programmer's editor, Microsoft Word, or any other program that accepts text from the Windows Clipboard. We suggest that you do so right away, before you forget it's there and overwwrite it with your next clipboard operation.
When you dismiss the message box, the calculator display returns, showing the string selected (highlighted) and its length in the space between the text box and the buttons, as shown in Figure 5. To capture the text itself, use the standard clipboard copy shortcut, CTL-C, after you paste its length somewhere permanent.

Figure 5 - String length calculation result stays in the calculator.
To calculate the length of a different string, enter new text and press the Copy button as shown above, or the Length button to calculate the length without placing the result on the clipboard.
In rare circumstances, the clipboard paste operation will fail. In that event, you will receive a message similar to Figure 6.

Figure 6 - Alert message box indicating that string length copy to the cliboard failed.
Should this happen, wait a moment or two and repeat the operation, or simply read the result from the calculator and paste it into your editor. The result is always left in the calculator.
We have seen these failures occur fairly consistenly immediately following a cut and paste operation in Windows Explorer. Since such operations use the Windows clipboard to store the list of files to copy, we theorize that the clipboard is left in a temporarily unusable state. Though we can reproduce the problem at will, we have yet to find a cure, other than time and a few intervening operations that avoid the clipboard.
The table below lists all the files that come in this package.
File Name |
Purpose and Other Notes |
P6StrLen.EXE |
This is the main program. This file nay go anywhere, so long as the support DLL goes in the same directory. |
P6StrLen.htm |
This document, formatted for viewing in any Web browser that supports tables. |
wbdED44I.dll |
WIL language run-time DLL. |
P6Consulting.CSS |
Cascading Style Sheet to accompany P6StrLen.htm. |
/images |
Folder containing images to accompany P6StrLen.htm. |
Though you may copy and run P6StrLen.EXE anywhere, the WIL language run-time
DLL wbdCI34i.dll, must accompany it.
Note: Unless explicitly stated otherwise in the documentation, we recommend that you install of our utilities into the same directory because they use a common set of DLLs. When you install more of our utilities, you will be prompted to overwite one or more DLLs and two images that accompany the documentation. Please allow the updates; like named DLLs have been tested with the entire collection and found to work correctly.
The table below gives a brief development history of this program.
Date |
By Whom |
Version |
Remarks |
12/29/1998 |
DAG |
1.0 |
Initial release (experimental – in house use only). |
07/14/2001 |
DAG |
1.1 |
Change to handle WM-CLOSE message gracefully (still experimental – in house use only). |
06/22/2003 |
DAG |
1.2 |
Initial Public Release. |
10/11/2004 |
DAG |
1.30 |
Automatically update length when the Paste button is clicked or selected with its accelerator key. |
This software is freeware. However, in the unlikely event that you need support, you may make your request using this form. Your inquiry will be handled on a best efforts basis, and any information you send us about your specific situation will be treated as confidential. We do, however, reserve the right to incorporate any ideas we get from our correspondence with you into future versions of P6StrLen or other software either for internal use or for sale. Should we do so, we shall give full credit to its source in the accompanying documentation.
Download your free copy here.
The MD5 digest of this file is b675bfe1de5c12fd70078b0b3c522188. You
can use MD5WIN to verify the MD5 digest of this
and other files.
P6 Consulting Home page www.wizardwrx.com.
| P6StrLen Home Page | Other Free Stuff |