VKontakte.DJ
forum traveling
 

Celestial Software

...better by design

Home Support SSH Client Forums
Welcome, Guest
Please Login or Register.    Lost Password?
[VBScript] Auto reconnect (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: [VBScript] Auto reconnect
#2985
[VBScript] Auto reconnect 10 Years, 3 Months ago  
caked a few snippits together to get this working, enjoy
cpu friendly

Code:


Sub Main

Dim con
Dim status
status=Terminal.SendText("")
Do Until i=10
subSleep(10)
If status = True Then
Else
con=Terminal.Connect(5)
End If
Loop
End Sub

Sub subSleep(strSeconds) ' subSleep(2)
    Dim objShell
    Dim strCmd
    set objShell = CreateObject("wscript.Shell")
    'objShell.Run cmdline,1,False

    strCmd = "%COMSPEC% /c ping -n " & strSeconds & " 127.0.0.1>nul"     
    objShell.Run strCmd,0,1 
End Sub 

joshua0139 (User)
Fresh Boarder
Posts: 1
graphgraph
User Offline Click here to see the profile of this user
Logged Logged  
 
Last Edit: 2013/12/29 02:10 By joshua0139.
 
The administrator has disabled public write access.  
Go to top