#1
|
|||
|
|||
VBS Scripting newbie
I normally work in ProComm but am required to now use SecureCRT so I'm asking for a little help. I have a script that I need to create and have the basics of what I'm trying to do but am not sure how to script to read multiple lines from a text file and insert in a particular point in the script.
In the script below I need to read from a text file the phTYPE and the setTN and then repeat the Sub Main and read the next line in the text file for both phTYPE and set TN until the end of the text file can I use one text file or are two required required? any assistance would be much appreciated. #$language = "VBScript" #$interface = "1.0" crt.Screen.Synchronous = True ' Begin script ' edited version 4 DIM phTYPE ' Enter Phone TYPE in quotes below phTYPE = "2050PC" Sub Main crt.Screen.Send "****ld 20" & chr(13) crt.Screen.WaitForString "REQ: " crt.Screen.Send "chg" & chr(13) crt.Screen.WaitForString "TYPE: " crt.Screen.Send phTYPE & chr(13) crt.Screen.WaitForString "TN " crt.Screen.Send setTN & chr(13) crt.Screen.WaitForString "ECHG " crt.Screen.Send "yes" & chr(13) crt.Screen.WaitForString "ITEM " crt.Screen.Send "fdn 59248" & chr(13) crt.Screen.WaitForString "ITEM " crt.Screen.Send "hunt 59248" & chr(13) crt.Screen.WaitForString "ITEM " crt.Screen.Send "key 16 mwk 59990" & chr(13) crt.Screen.WaitForString " KEY " crt.Screen.Send chr(13) crt.Screen.WaitForString "ITEM " crt.Screen.Send chr(13) End Sub DIM setTN ' Enter the TN in quotes below setTN = "252 1 15 29" |
Tags |
csv , file calling , script |
Thread Tools | |
Display Modes | Rate This Thread |
|
|