×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

reusing a user input further down in the script

reusing a user input further down in the script

reusing a user input further down in the script

(OP)
I am inputting a lot of data want to know if I can take data that i enter and have it automatically used later in the script. Also I have a spot where i need it to wait for me to enter data but it is putting a space in and i have to hit return and then input my data. Is there a way so it will not put the space in? Here is part of my script I am talking about.

crt.Screen.WaitForString "TN "
crt.Screen.Send " "
crt.Screen.WaitForString "DES "
crt.Screen.Send "TOR_PVR_COT" <- here i enter a 4 digit number after the COT and would like to have script enter it below
crt.Screen.WaitForString "CUST "
crt.Screen.Send "0" & chr(13)
crt.Screen.WaitForString "NCOS "
crt.Screen.Send " " <-- here is where I have to enter a number but it is putting in a space
crt.Screen.WaitForString "RTMB "
crt.Screen.Send " " <-- if I leave the quotes together the script hangs so i have to have the space between the quotes
crt.Screen.WaitForString "PRDN "
crt.Screen.Send "205" <- enter the 4 digit number after the 205
crt.Screen.WaitForString "CMF "
crt.Screen.Send "no" & chr(13)

Any help would be greatly appreciated.

RE: reusing a user input further down in the script

This isn't really a vbScript question, as the functionality is actually being provided by an ActiveX object - a quick Google indicating probably for a VanDyke product, most likely SecureCRT.

However, consider:

Result = crt.Screen.WaitForString "<whatever>"
crt.Screen.Send Result

This document might also prove useful, if you have not already got it: https://www.vandyke.com/support/tips/scripting/ind...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close