Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-09-2012, 05:35 PM
10tech 10tech is offline
Registered User
 
Join Date: Mar 2012
Posts: 20
Abort or stop a transfer in progress

I'm new to SecureCRT. I'm also new to VBS.

After capturing plain text data in a window (such as WordPad), I modify that data and then need to re-send it back to the remote system. I usually just highlite (select all) the modified data, hit the copy button, and then hit then paste button in my session window to send the data. I set the Line Delay to 500ms.

One: Can I set SecureCRT to send line-by-line after a certain prompt from the remote system (Line Pacing Control)?

Two: How can I stop the transfer in process when there is an error encountered?

Three: Can I set SecureCRT to capture larger quantities of data without having to highlite it? (turn Capture on and off)?

Thanks. Tom.
Reply With Quote
  #2  
Old 03-09-2012, 06:17 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,544
Hello Tom,

Welcome! As a new user to both SecureCRT and VBScript, I recommend you first read the scripting manual we have made available on our website here. There are lots of tips included in it (and example scripts) that cover the territory you have described.

Another way to get started in your scripting efforts is to use the built-in Script Recorder (Script menu).

What version of SecureCRT are you using (Help / About SecureCRT...)?

Now to address your specific questions:

Quote:
One: Can I set SecureCRT to send line-by-line after a certain prompt from the remote system (Line Pacing Control)?
Yes, this can be accomplished using a very common Send() and WaitForString() pattern. The script manual even includes a Slow Paste (Line Delay) script example.

See section 4.2 of the scripting manual so you don't violate the Golden Rule: you should have a WaitForString() for each Send().

I have also attached a PasteWithEchoFlowControl example script to this thread.


Quote:
Two: How can I stop the transfer in process when there is an error encountered?
By transfer in process, I assume you mean the pasted data (or Send() command). It would require adding error detection into the script.


Quote:
Three: Can I set SecureCRT to capture larger quantities of data without having to highlite it? (turn Capture on and off)?
I am not sure how you are using the term capture/highlite. Are you referring to selecting text manually in the SecureCRT window?

Or are you talking about the need to log the results of a command to a file?
Attached Files
File Type: txt PasteWithEchoFlowControl.vbs.txt (4.0 KB, 377 views)
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 03-09-2012, 06:43 PM
10tech 10tech is offline
Registered User
 
Join Date: Mar 2012
Posts: 20
Thank you Brenda for your reply.

I am using SecureCRT 6.6.1 Build 289

1. Well, I was hoping that Line Pacing Functions were built into the Global Options without having to built each batch of data into a file with those scripting functions. I'm use to an older emulator that had those functions in the Global Options. Guess I'll have to learn something new.

My remote systems use ASCII text language. No fancy FTP, just plain line-by-line texting, which takes me to 2.

2. Uploading line-by-line of a block of data that is 80 pages long, sometimes the machine will burp and cause the pacing to get out of sync. I need to stop the upload and restart just before the burp. I was hoping for a button that would stop that process (like my old emulator would do).

3. I think Logging is what I need here. I can do that. I'm use to the term "Capture". Sorry.

Thanks.
Reply With Quote
  #4  
Old 03-10-2012, 01:33 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,544
Hi 10tech,

Sorry, I did not mean to mislead you. Any ad hoc connections use the Default Session for configuration options, so editing the Default Session with the desired Line Send Delay will apply this setting to those connections. See this tip on our website for information on editing the Default Session.

Quote:
2. Uploading line-by-line of a block of data that is 80 pages long, sometimes the machine will burp and cause the pacing to get out of sync. I need to stop the upload and restart just before the burp. I was hoping for a button that would stop that process (like my old emulator would do).
I still don't quite grasp the above. So you are not trying to automate the above, just a way to interrupt a paste in the GUI, is that correct?

What is the old emulator you are referencing (if you want to say)?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 03-12-2012, 03:41 PM
10tech 10tech is offline
Registered User
 
Join Date: Mar 2012
Posts: 20
Hi Brenda

My department is currently using Crosstalk V3.2. and trying to convert over to SecureCRT.

Understand that we have about 100 systems that we have to access. Some are 10meg IP access but most are still operating at 1200bps. So, 80 pages of data on the slower speeds takes about 45 minutes to dump and/or to upload.

These systems talk ASCII text language. Thats it. Data is line-by-line at 1200 bps... except for the faster IP connected ones, but still ASCII text.

While I was playing around this morning I discovered the "Send ASCII" and "Cancel" buttons in the Transfer Tab. This seems to work pretty well although I would like to add a "WaitForString" prompt (REQ) before sending the next line. The "send delay" timing settings work but not as accurate as a WaitForString. This would be a nice option to have in the Session Options window.

In our systems, when I send a line of data, the system checks for accuracy and then responds with an "REQ", else it sends a "Syntax". I need to interupt the sending process at the Syntax point, correct the data and then resend from that point... very antiquated.

I found a sample VBscript for uploading text line-by-line on your Website which I think I can make work. I think with a little more playing around I can make this work. We don't use SSH... just Telnet. These systems are 25 to 30 years old.

To make uploading automatic, it would require a script that would have to check for a lot of different variables and timing factors that quite honestly, nobody here (including me) know how to build. Thats why we are kinda stuck doing it the old fashion way... line-by-line. Just that we need to do it faster.

Tom
Reply With Quote
  #6  
Old 03-12-2012, 03:54 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,544
Hi Tom,

Thanks for the clarification.

Quote:
To make uploading automatic, it would require a script that would have to check for a lot of different variables and timing factors that quite honestly, nobody here (including me) know how to build.
I understand now that you were hoping to automate the process via scripting but due to the factors mentioned above, will just use Send ASCII.

I have added this thread to a feature request in our product enhancement database to add the ability to wait for a line prompt in addition to line send delay (GUI option). Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct e-mail notification, contact support@vandyke.com and include "Feature Request - Forum Thread #10337" in the subject line.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #7  
Old 03-12-2012, 05:36 PM
10tech 10tech is offline
Registered User
 
Join Date: Mar 2012
Posts: 20
Thanks Brenda, I'm sure I will be calling upon your group in the near future.

Tom
Reply With Quote
  #8  
Old 03-13-2012, 09:03 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,544
Hi Tom,

Quote:
I found a sample VBscript for uploading text line-by-line on your Website which I think I can make work.
Let us know if you have any specific questions about editing the example script to accomplish your objective.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #9  
Old 09-26-2012, 04:30 PM
Maureen's Avatar
Maureen Maureen is offline
VanDyke Product Director
 
Join Date: Feb 2004
Location: Albuquerque, NM
Posts: 1,597
The ability to wait for a string prompt has been added to a pre-beta version of SecureCRT. If you would be interested in trying it, please send e-mail to me at Maureen.Jett@vandyke.com.

Maureen
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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