#1
|
|||
|
|||
how to print tab character directly on session
Is there anyone can tell me how to set option of SecureCRT correctly to display a right TAB(\t) character other than four blank characters?
I create a serial COM session on SecureCRT, my printer will print visible ASCII characters and un-visible TAB character, but SecureCRT will receive TAB character and display four blank characters other than TAB(\t) character, which is not my desired case. I had try to set "Display tab as" in Emulation/Advanced category of the Session Options dialog with "\t" or "{TAB}", but it not works. appreciate your help! |
#2
|
|||
|
|||
Hi doyanger,
And you were getting the same behavior before you enabled Display tab as initially? Are you sure it's a tab character you are receiving from the remote? The best way to find that out is to capture a raw log. To create a raw log:
Since a raw log can contain sensitive information, feel free to send it as an attachment via email to support@vandyke.com. Please reference "Attn Brenda - Forum Thread #12866" in the subject line.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Thanks for your quick reply!
And you were getting the same behavior before you enabled Display tab as initially? => yes, i can't copy printed message in SwcureCRT's display panel by Ctrl + C directly. Are you sure it's a tab character you are receiving from the remote? => I confirm it's a TAB character. I can get TAB character in Raw log file as you mentioned now, thank you for your help ~ but I think it is more convenient to get them by Ctrl + C directly in AP's panel ![]() |
#4
|
|||
|
|||
Hi doyanger,
You are not going to see a tab displayed in output in the terminal window as it is an "unprintable character". What problem are you trying to solve?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Hi Brenda
What problem are you trying to solve? => The serial remote will send formatted string, which is seperated by a TAB character, to SecureCRT, e.g. : Raw data: 24c3 e972 (here the hex data is sperated by 1 TAB character) 29b1 f74d 28cd f40d 258a eca8 268e ef50 2822 f35f Terminal data show as follow: 24c3 e972 (here the hex data is sperated by 4 blank characters) 29b1 f74d 28cd f40d 258a eca8 268e ef50 2822 f35f These string display in terminal above, i wanted to copy them by Ctrl+C to my excel file simply, supposed they were located in 2 colums, but it fails, they are located in one colums. It seems copying from Raw log file is the only right solution? |
#6
|
|||
|
|||
Hi doyanger,
I see. That can be as easy as mapping a one-line script to a button on the button bar and running it after you've copied the data to the clipboard: crt.Clipboard.Text = Replace(crt.Clipboard.Text, " ", vbtab) Does that work for you?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#7
|
|||
|
|||
Hi doyanger,
My manager also suggested these alternatives:
Code:
# $language = "VBScript" # $interface = "1.0" Set objExcel = CreateObject("Excel.Application") strFilePath = crt.Session.LogFileName objExcel.Workbooks.Open(strFilePath) objExcel.Visible = True
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#8
|
|||
|
|||
Quote:
You means mapping a key on Keymap Editor toolbar button with the scripts you mentioned? I try it, but SecureCRT report error when I press the key I've mapped after I copied the data to the clipboard: Failed to open script file(crt.Clipboard.Text = Replace(crt.Clipboard.Text, " ", vbtab)) |
#9
|
|||
|
|||
Hi doyanger,
No, I meant buttons on the button bar: (Button Bar video) https://www.youtube.com/watch?v=olyCcUWRimI (Button Bar online tip) https://www.vandyke.com/support/tips/buttonbar.html But you should be able to map it to a hotkey also. However, you cannot just put the line of script code, you have to save it as a script file. Put it in a file and save it as Filename.vbs. Then map your key to point to that script file. ![]() To be honest, using Keymap Editor just means one more file to keep track of, we recommend mapping keys in the Terminal / Emulation / Mapped Keys category of Session Options. If the keymap(s) need(s) applied to many or all sessions, see these tips on our website: https://www.vandyke.com/support/tips/defaultset.html https://www.vandyke.com/support/tips/multisessions.html
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#10
|
|||
|
|||
Hi Brenda
sorry for my late reply! I've save the script you provided to a vbs file, and modified to a 4-blank characters version: crt.Clipboard.Text = Replace(crt.Clipboard.Text, " ", vbtab) It do replace blank character with TAB. Thank you for your warmly help!!! |
#11
|
|||
|
|||
Hi doyanger,
You are quite welcome. Have a great weekend! ![]()
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
display , tab |
Thread Tools | |
Display Modes | |
|
|