Hi!
ich hab ein script geschrieben, das automatische alle 5 Stunden prüft ob die Autoit version die aktuellste ist...
Nur, bei mir spinnt der IE , deswegen geht Inetget() nicht!
Kann wer testen, ob es bei ihm geht?
und zwar:
Das script lädt die datei update.dat runter . und zwar in den Temp ordner.
Dann kommt ein Tray tip, wo eure version und die aktuelle steht.
Wenn bei der aktuellen Version 0 steht, sagt es mir!
Falls die richtige dortsteht, auch^^
falls ihr seht:
Du hast die aktuellste Version, lasst es mich auch wissen!
Spoiler anzeigen
; Auto UpdateIt by Huggy
[/autoit] [autoit][/autoit] [autoit]#include <Inet.au3>
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Global $autoit = RegRead('HKLM\Software\AutoIt v3\AutoIt', 'InstallDir')
Global $url = "http://www.autoitscript.com/autoit3/files/beta/update.dat"
Global $local = @TempDir & '\au3_update.dat'
Global $s_BetaPath = RegRead('HKLM\Software\AutoIt v3\AutoIt', 'betaInstallDir')
If Not @error And FileExists($s_BetaPath & '\AutoIt3.exe') Then
$version2local = FileGetVersion($s_BetaPath & "\AutoIt3.exe")
EndIf
Global $s_Au3Path = RegRead('HKLM\Software\AutoIt v3\AutoIt', 'InstallDir')
If Not @error And FileExists($s_Au3Path & '\AutoIt3.exe') Then
$version1local = FileGetVersion($s_Au3Path & "\AutoIt3.exe")
EndIf
While 1
_check()
sleep(18000000)
Wend
; main
[/autoit] [autoit][/autoit] [autoit]Func _check()
If FileExists(@TempDir & "\AutoIt\update.dat") Then
FileDelete(@TempDir & "\AutoIt\update.dat")
Endif
#comments-start $url = "http://www.autoitscript.com/autoit3/files/beta/update.dat"
$source = _INetGetSource($url)
InIWrite(@TempDir & "\AutoIt\update.dat", "", "", $source)
#comments-end
InetGet("http://www.autoitscript.com/autoit3/files/beta/update.dat", @TempDir & "\AutoIt\update.dat")
sleep(2000)
if @error = 1 Then
MsgBox(0, "", "error")
endif
$version1 = IniRead(@TempDir & "\AutoIt\update.dat", "AutoIt", "version", "0")
$setup1 = IniRead(@TempDir & "\AutoIt\update.dat", "AutoIt", "setup", "0")
$version2 = IniRead(@TempDir & "\AutoIt\update.dat", "AutoItBeta", "version", "0")
$setup2 = IniRead(@TempDir & "\AutoIt\update.dat", "AutoItBeta", "setup", "0")
if $version1 <> $version1local Then
TrayTip("Achtung!", "Es gibt eine aktuellere Autoit Version! Die aktuellste Version heißt: " & $version1 & " , Ihre Version " & @Crlf & "ist Version : " & @AutoItVersion & @Crlf & " Sie wird jetzt heruntergeladen!", 5)
InetGet($setup1, @TempDir & "\AutoIt\setup.exe")
_install()
Else
trayTip("Aktuell", "Ihre Autoit Version ist auf dem neusten Stand!", 5)
EndIf
[/autoit] [autoit][/autoit] [autoit]sleep(6000)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]if $version2 <> $version2local Then
TrayTip("Achtung!", "Es gibt eine aktuellere Autoit Version! Die aktuellste Version heißt: " & $version2 & " , Ihre Version " & @Crlf & "ist Version nummer: " & $version2local & @Crlf & " Sie wird jetzt heruntergeladen!", 5)
InetGet($setup2, @TempDir & "\Autoit\setup.exe")
_install()
Else
trayTip("Aktuell", "Ihre Autoit - Beta - Version ist auf dem neusten Stand!", 5)
sleep(2000)
EndIf
EndFunc
[/autoit] [autoit][/autoit] [autoit]_check()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func _install()
If FileExists(@TempDir & "\AutoIt\setup.exe") Then
TrayTip("Installing", "Please don't move anything!", 2)
Run(@TempDir & "\Autoit\setup.exe")
if WinActive("Autoit", "Beta") Then
[/autoit] [autoit][/autoit] [autoit]ControlClick("AutoIt", "beta", 2)
[/autoit] [autoit][/autoit] [autoit]Endif
sleep(1000)
WinwaitActive("Autoit", "Welcome")
ControlClick("AutoIt", "Welcome", 1)
sleep(1000)
WinWaitActive("Autoit", "Licence")
ControlClick("Autoit", "Licence", 1)
if WinActive("Autoit", "Previous") Then
WinWaitActive("Autoit", "Previous")
ControlClick("Autoit", "Previous", 1)
Endif
WinWaitActive("Autoit", "Default")
ControlClick("AutoIt", "Default", 1201)
ControlClick("AutoIt", "Default", 1)
sleep(1000)
WinWaitActive("AutoIt", "Choose")
ControlClick("AutoIt", "Choose", 1)
sleep(1000)
WinWaitActive("AutoIt", "Completing")
ControlClick("Autoit", "Completing", 1)
sleep(1000)
TrayTip("Finished", "Finished!!!!", 2)
Endif
EndFunc
Wäre ganz toll!
DANKE!