Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

nettalk:scripting:autoupdate [2005/07/14 14:54] (aktuell)
192.168.0.50 angelegt
Zeile 1: Zeile 1:
 +====== Auto Update ======
 +<code vb>
 +#​NewScriptBegin AutoUpdate
  
 +Dim MyConn
 +Dim isOut
 +
 +Sub AppLoad()
 +  StartTimer 10000,​0,"​CheckUpdate",​1
 +End Sub
 +
 +Sub CheckUpdate()
 +  Print "~ Check for Updates...",​ 0, valcClientMsg
 +  MyConn=dccconnect("​www.ntalk.de",​80,"","",​0,​1)
 +End Sub
 +
 +Sub Serv_Connected(ConnID)
 +  if ConnID = MyConn Then
 +    SendData "GET /​Verkabelt/​Nettalk/​Update/​Update.txt HTTP/​1.0",​ ConnID
 +    SendData "​Connection:​ Close"​+chr(13)+chr(10),​ ConnID
 +    isOut=0
 +  End if
 +End Sub
 +
 +Sub RecvDCCMsg(Text,​ Nick, FrameID, ConnID)
 +  if ConnID = MyConn Then
 +    if left(Text,​17)="<​Updates version="​ and isOut=0 Then
 +      i=instr(19,​Text,​chr(34))
 +      myver=mid(Text,​19,​i-19)
 +      if version = myver Then
 +        Print "~ Your version " & version & " is still up-to-date.",​ 0, valcClientMsg
 +      else
 +        Print "~ The version " & myver & " is available, you use currently " & version & ". ", 0, valcClientMsg
 +        Print "​[Start update]",​ 0, valcLink, 1,"",​ 8
 +      End if
 +      closeconn ConnID
 +      isOut=1
 +    End if
 +  End if
 +End Sub
 +</​code>​

Eigene Werkzeuge