Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-20-2006, 04:46 PM
zorglups's Avatar
zorglups zorglups is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 61
Clipboard type used during the paste should be TEXT

SecureCRT 5.1.0 build 207

This is not easy to explain so let's go step by step...

I'm working all day long on Unix machines using SecureCRT.
On the other hand, I'm working as well with MS Office.

Unfortunately when one will write a doc or a procedure (or even a single mail in Outlook), MS Word will do "autocorrect" stuffs on the text as you type.

For example if you type "ls -lrt", MS Word will translate it to "Ls -lrt" where the dash (ascii 0x2D) has been replaced by a stupid longer dash (ascii 0x96).

See the attached example.txt. Open it in an editor and then switch to hexa view.

If you copy this text (including the 0x96 character) and paste it on securecrt, the character is sent as-is while I would like to have the 0x20 char sent.

You might tell me that the problem is on the MS Word side and that I should disable the "autocorrect" option.
Well. Most of the documents used are not mine and it will be difficult to change the settings in a 5000 engineer group.

I had a look at the windows clipboard API and found that several versions of the clip are saved. (http://www.codeproject.com/clipboard...clipboard1.asp)


What would do the trick is to have an option to use the CF_TEXT version of the clipboard during the paste instead of CF_UNICODETEXT.

Code:
HANDLE hClipboardData = GetClipboardData(CF_TEXT);
Another solution is to parse the clipboard upon past and replace ugly characters. (for example, you copy the text, paste it into notepad, copy it again, then paste it in SecureCRT). This is not my prefered solution.

Please please please please please please please please please please

Thank,

Pierre.

Links of interrest:

http://www.codeproject.com/clipboard....asp?msg=26830
Attached Files
File Type: txt example.txt (54 Bytes, 681 views)
Reply With Quote
 

Thread Tools
Display Modes

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:41 AM.