#1
|
|||
|
|||
Allow Script to Pause to Copy Output into Text Box
Good evening,
I thank you all for the continued support, and examples have been helpful. So my script below works. But I have to type in the information from the output into the Text Box, would like to be able to possibly copy it from the screen into the text box. Any suggestions? #$language = "VBScript" #$interface = "1.0" crt.Screen.Synchronous = True ' This automatically generated script may need to be ' edited in order to work correctly. Sub Main crt.Screen.Send "su - root" & chr(13) crt.Screen.WaitForString "#" crt.Screen.Send "command to list array" & chr(13) crt.Screen.WaitForString "#" crt.Screen.Synchronous = False crt.Screen.Synchronous = True THIS PART ON SCREEN NOW SHOWS THE NAME I AM WORKING ON FOR THE NAME. I HAVE TO TYPE IT INTO THE TEXT BOX BELOW: ' Prompt the end user for data' strAnswer = InputBox("Please enter the LESS Array Name on Screen:") crt.Screen.Send "/opt/sun/directory command " crt.Screen.Send strAnswer crt.Screen.Send " disk " & chr(13) End Sub |
#2
|
|||
|
|||
Hi King908,
Is the data in a specific/static location each time? You can use Get() or Get2() as described in section 4.3 (Capturing Data from a Remote Machine) in the Scripting Essentials scripting guide available on our website here. Note also that your three Send() calls at the end of the script can be concatenated as shown: crt.Screen.Send "/opt/sun/directory command " & strAnswer & " disk " & chr(13) ![]()
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
I just checked, and the data isn't always on the same Row. The output sometimes is 19,8 through 19,34 or 20,8 through 20,34 depending on the RSA warning.
|
#4
|
|||
|
|||
Hi King908,
Is there anything consistent in the output prior to username being displayed? Perhaps you can use WaitForString() up until the RSA warning and then ReadString() to capture what comes next.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|