Hi ich hatte vor meinem script einen updater zu schenken Leider will der updater nich so wie ich will.
Hier der script: (Ich weis jemand hatte das selbe problem hat mir aber nix geholfen)
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Dim $ver = "2.0"
HttpSetUserAgent('Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10')
If @OSArch = "X64" Then
InetGet("http://molaynox.bplaced.net/UpdateX64.txt",@ScriptDir & "\Tmp\UpdateX64.txt", 1, 0)
$file = FileOpen(@Scriptdir & "\update.txt", 0)
$line = FileReadLine($file, 1)
$line2 = FileReadLine($file, 2)
EndIf
If @OSArch = "X86" Then
InetGet("http://molaynox.bplaced.net/Update.txt",@ScriptDir & "\Tmp\Update.txt", 1, 0)
$file = FileOpen(@Scriptdir & "\update.txt", 0)
$line = FileReadLine($file, 1)
$line2 = FileReadLine($file, 2)
EndIf
If $line = $ver Then
MsgBox(64, "Kein Update", "Du hast die neuste Version: (" & $ver & ")")
FileClose($file)
FileDelete(@Scriptdir & "\update.txt")
If @OSArch = "X86" Then Run(@ScriptDir & "\BlackEyes StreamPlayer.exe")
If @OSArch = "X64" Then Run(@ScriptDir & "\BlackEyes StreamPlayerX64.exe")
Else
MsgBox(64, "Update!", "Es ist eine Neue Version verfügbar!")
$fg = MsgBox(4, "Updaten?", "Möchtest du jetzt Updaten?")
If $fg = 6 Then
HttpSetUserAgent('Firefox')
$Form1 = GUICreate("Update herunterladen", 295, 133, 193, 125)
$Progress1 = GUICtrlCreateProgress(20, 56, 260, 17)
$Label1 = GUICtrlCreateLabel("Update ...", 20, 37, 260, 17)
GUISetState(@SW_SHOW)
$Source = $line2
$aFile = StringSplit($Source, "/")
Local $dest = @ScriptDir & "\" & $aFile[$aFile[0]]
ConsoleWrite($dest & @CRLF)
Local $nBytes, $nSize = InetGetSize($Source)
Local $hDownload = InetGet($Source, $dest, 1, 1)
Do
Sleep(1000)
$nBytes = InetGetInfo($hDownload, 0)
$ipercent = Floor($nBytes / $nSize * 100)
GUICtrlSetData($Progress1, $ipercent)
GUICtrlSetData($Label1, $nBytes & " von " & $nSize & " Bytes = " & $ipercent & "% geladen")
Until InetGetInfo($hDownload, 2) ; Check if the download is complete.
Local $aData = InetGetInfo($hDownload) ; Get all information.
InetClose($hDownload) ; Close the handle to release resourcs.
MsgBox(0, "", "Bytes read: " & $aData[0] & @CRLF & _
"Size: " & $aData[1] & @CRLF & _
"Complete?: " & $aData[2] & @CRLF & _
"Successful?: " & $aData[3] & @CRLF & _
"@error: " & $aData[4] & @CRLF & _
"@extended: " & $aData[5] & @CRLF)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
EndIf
EndIf
Was mache ich falsch???????? Das Script sagt immer das eine neue version verfügbar ist obwohl es nicht so ist und es lädt die .txt und die anderen dateien garnich herunter.