View Single Post
  #2  
Old 03-27-2019, 11:11 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,316
Hi Reno,

Your code looks fine to me (and worked for me in a quick test). I did add a synchronous statement (and used crt.Dialog.MessageBox for all cases rather than send something to the remote):
Code:
crt.Screen.Synchronous = True
crt.Screen.Send "ssh 192.1.1.1" & vbcr
result = crt.screen.WaitForStrings("assword: ", "~]$ ", 10)
If result = 1 Then crt.Dialog.MessageBox "Received password prompt" 
If result = 2 Then crt.Dialog.MessageBox "Already logged in as user" 
If result = 0 Then crt.Dialog.Messagebox "Error: Timed out waiting for prompt!"
What were your results?
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote