|
#1
|
|||
|
|||
Am I capturing hidden characters?
I'm using the Get command to capture a single character on screen, usually the letter "N":
Code:
x = crt.screen.get(11,68,11,68) crt.Session.SetStatusText(">" & x & "<" ) But when this should display ">N<", it shows "> (about 20 blank spaces) <" Are there some hidden characters or something that could be causing this? Last edited by ShawnVW; 07-06-2016 at 10:19 AM. |
#2
|
|||
|
|||
Hi ShawnVW,
In my tests, it worked as expected, but I controlled the output (see attached). ![]() There could be hidden characters in the output you receive, but I need additional information about that output. It's strange that you get 20 or so characters. It sounds like there could be line endings or tabs being converted to spaces that is throwing things off. Are these two lines the entirety of your script? What is the output you receive prior to running this code? If you paste that output into some application with the ability to show hidden/non-printing characters, does that shed any light on what the 68th character actually is?
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Not even close!
Quote:
Quote:
Thanks! |
#4
|
|||
|
|||
Hi ShawnVW,
With a form it may be difficult to accomplish the objective. Get() may not be the best method to use. I believe you can show formatting marks in several of the Microsoft Office products. You might just search on "show invisibles" or a similar term in the Help file.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
I found something. The field label reads "22)<7 spaces>ALLOW B/O".
I used this: Code:
strResult = crt.Screen.ReadString("ALLOW B/O:") msgbox(right(strResult,20)) "<several spaces>22)<7 spaces>ALLOW B/O:" What I got was: "N:<left arrow>[11;47H22)<several spaces>" Isn't there some method to capture just the "normal" characters onscreen? If Get isn't the best way to see what's at a particular point on the screen, what would be better? |
#6
|
|||
|
|||
Hi ShawnVW,
Yes, I believe it's the IgnoreEscape property available to the Screen Object that you seek. (See Scripting / Script Objects Reference / Screen Object in SecureCRT's Help file.) That should take care of the escape sequence [11;47H22], but I am not sure what you mean by the <left arrow> reference. What is the actual output? Quote:
![]()
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
screen->get , vbscript |
Thread Tools | |
Display Modes | Rate This Thread |
|
|