Bitte kurz testen!

  • 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
    [autoit]

    ; 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'

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1

    _check()

    sleep(18000000)


    Wend

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ; 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")

    [/autoit] [autoit][/autoit] [autoit]

    sleep(2000)
    if @error = 1 Then
    MsgBox(0, "", "error")
    endif

    [/autoit] [autoit][/autoit] [autoit]

    $version1 = IniRead(@TempDir & "\AutoIt\update.dat", "AutoIt", "version", "0")
    $setup1 = IniRead(@TempDir & "\AutoIt\update.dat", "AutoIt", "setup", "0")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $version2 = IniRead(@TempDir & "\AutoIt\update.dat", "AutoItBeta", "version", "0")
    $setup2 = IniRead(@TempDir & "\AutoIt\update.dat", "AutoItBeta", "setup", "0")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit]


    Wäre ganz toll!


    DANKE!

    Einmal editiert, zuletzt von huggy (15. November 2006 um 20:00)

    • Offizieller Beitrag

    Hi,

    es liegt am InGet, der funktioniert so nicht.

    Edit: Okay, ein bißchen mehr Info: Ich glaube es liegt daran, dass du es in den Unterordner Autoit speichern willst im TempDir. Diesen habe ich allerdings nicht. Probier mal ohne.

    So long,

    Mega

  • Spoiler anzeigen
    [autoit]

    ; Auto UpdateIt by Huggy

    [/autoit] [autoit][/autoit] [autoit][/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'

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1

    _check()

    sleep(18000000)


    Wend

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ; main

    [/autoit] [autoit][/autoit] [autoit]

    Func _check()

    If FileExists(@TempDir & "\update.dat") Then
    FileDelete(@TempDir & "\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 & "\update.dat")

    [/autoit] [autoit][/autoit] [autoit]

    sleep(2000)
    if @error = 1 Then
    MsgBox(0, "", "error")
    endif

    [/autoit] [autoit][/autoit] [autoit]

    $version1 = IniRead(@TempDir & "\update.dat", "AutoIt", "version", "0")
    $setup1 = IniRead(@TempDir & "\update.dat", "AutoIt", "setup", "0")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $version2 = IniRead(@TempDir & "\update.dat", "AutoItBeta", "version", "0")
    $setup2 = IniRead(@TempDir & "\update.dat", "AutoItBeta", "setup", "0")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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 & "\setup.exe")
    _install()

    Else

    trayTip("Aktuell", "Ihre Autoit Version ist auf dem neusten Stand!", 5)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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 & "\setup.exe")
    _install()

    Else

    trayTip("Aktuell", "Ihre Autoit - Beta - Version ist auf dem neusten Stand!", 5)


    sleep(2000)
    EndIf

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    _check()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func _install()

    If FileExists(@TempDir & "\setup.exe") Then


    TrayTip("Installing", "Please don't move anything!", 2)

    Run(@TempDir & "\setup.exe")

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    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

    [/autoit]

    Danke!

    jetzt? =)

    3 Mal editiert, zuletzt von huggy (15. November 2006 um 20:00)

  • super!

    wenn er sagt es ist auf dem neusten stand, funktioniert es!

    denn dann hat er die datei heruntergeladen, gecheckt was die version im I NET ist und gleich richtig gehandelt :)

    Jetzt mach ich es noch bisschen komfortabler und fertig

    DANKE

  • Jo wenns ken update gibt dann funzt es weiß aber auch noch net mehr hab heut erst geupdatet aber thx fürs prog