View Single Post
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):
crt.Screen.Synchronous = True
crt.Screen.Send "ssh" & 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?

VanDyke Software
Technical Support
(505) 332-5730
Reply With Quote