Re: Timeout causes script to terminate (General questions)
Thanks for your reply.
Here is the code where it hangs. I could change the timeout to 0 but I have a feeling the script will never find the text in the wait for. The second line from the bottom is the one where the code is exiting... I am reverse telnetting into a modem on a router and it is proving to be very tricky, as not all of the modems are responding or echoing (dipswitches are not all proper) ... I if I wait for a LF it works a little bit more often, but the way I've got it now waiting for any character A-Z works very well, except those cases where the modem freaks out and doesn't send anything back. Is there a way to make it so the script does not break on all errors, or is there a way to make wodssh dll not exit the script when it hits the timeout? Or if you've got any ideas for my script.
CRLF = Chr(13) & Chr(10)
CR = Chr(13)
LF = Chr(10)
Set ssh = CreateObject( WeOnlyDo.wodSSHCom.1 )
ssh.HostName = routerip
ssh.Login = username
ssh.Password = password
ssh.Blocking = true
ssh.Protocol = 4
ssh.Timeout = 65
ssh.Connect
''... blah blah login and do other stuff ...
ssh.Send atdt & phonenumber & CRLF
wscript.echo dialing & phonenumber
ssh.WaitFor regex:[A-Z]
sSocketText = ssh.Peek + sSocketText
''... blah blah do more stuff ...
Complete thread:
- Timeout causes script to terminate - Logan, 2008-06-27, 04:37
- Re: Timeout causes script to terminate - woddrazen, 2008-06-27, 08:58
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 15:48
- Re: Timeout causes script to terminate - wodDamir, 2008-06-27, 15:59
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 16:13
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 16:23
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 17:19
- Re: Timeout causes script to terminate - wodDamir, 2008-06-27, 17:22
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 18:39
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 18:41
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 19:30
- Re: Timeout causes script to terminate - woddrazen, 2008-06-27, 19:36
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 19:30
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 18:41
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 18:39
- Re: Timeout causes script to terminate - wodDamir, 2008-06-27, 17:22
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 17:19
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 16:23
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 16:13
- Re: Timeout causes script to terminate - wodDamir, 2008-06-27, 15:59
- Re: Timeout causes script to terminate - Logan, 2008-06-27, 15:48
- Re: Timeout causes script to terminate - woddrazen, 2008-06-27, 08:58