Automatisches Backup mittels Software - Probleme

  • Hallo zusammen,

    ich bin ganz neu hier und hab auch gleich mal
    ein Problem mit AutoIt 3 :(

    Und zwar folgendes:

    Ich habe mir ein Skript geschrieben, mit dem ich mittels Software ein Backup-Image von meiner Systemplatte ziehen kann.
    Es funktioniert auch einwandfrei, bis ich dann an den Punkt komme, an dem das Backup gemacht wird.
    Das Backup läuft, je nach Plattengröße unterschiedlich lange. Im Statusbalken oben laufen die Prozent mit, wie weit er schon ist.
    Sobald er fertig ist mit dem Backup, wird aus dem "Abbrechen"-Button ein "OK"-Button.
    Und genau hier ist mein Problem. Er geht nicht weiter, wenn der OK-Button auftaucht steht das Skript.

    Ich hab schon viele verschiedene Möglichkeiten versucht auf den Fensterinhalt zu reagieren, aber das hat alles nichts gebracht.

    In meiner folgenden Skriptversion hab ich versucht auf den OK-Button zu reagieren.
    Ich habs auch schon über die Statuszeile versucht, es über die 100%-Anzeige zu regeln, die nach dem Ende des Backups kommt.
    Ging aber auch nicht :(

    Hier mal das Skript:

    Opt("WinWaitDelay",100)
    Opt("WinTitleMatchMode",4)
    Opt("WinDetectHiddenText",1)
    Opt("MouseCoordMode",0)
    #include <Date.au3> ;fuer Datumabfrage
    Dim $datum

    Run('C:\Programme\Snapshot\snapshot.exe')

    WinWait("Drive SnapShot Startup Screen","License Information")
    If Not WinActive("Drive SnapShot Startup Screen","License Information") Then WinActivate("Drive SnapShot Startup Screen","License Information")
    WinWaitActive("Drive SnapShot Startup Screen","License Information")
    MouseMove(200,90)
    MouseDown("left")
    MouseUp("left")
    Sleep(1000)

    ;Option 1 - Backup Disk to File
    WinWait("SnapShot - Select the Volume","All Sizes")
    If Not WinActive("SnapShot - Select the Volume","All Sizes") Then WinActivate("SnapShot - Select the Volume","All Sizes")
    WinWaitActive("SnapShot - Select the Volume","All Sizes")
    ;Send("{DOWN}")
    ;Sleep(1000)
    ;Send("{DOWN}")
    Sleep(1000)
    Send("{ALTDOWN}n{ALTUP}")
    Sleep(1000)

    WinWait("Select File for","destination file")
    If Not WinActive("Select File for","destination file") Then WinActivate("Select File for","destination file")
    WinWaitActive("Select File for","destination file")
    $datum = _NowDate()
    Send("c:\snapshot\" & $datum & ".sna")
    Send("{ALTDOWN}s{ALTUP}")
    Sleep(1000)

    WinWait("","OK")
    If Not WinActive("","OK") Then WinActivate("","OK")
    WinWaitActive("","OK")
    Sleep(1000)
    MouseMove(180,270)
    Sleep(1000)
    Send("{ENTER}")
    Sleep(1000)

    WinWait("Drive SnapShot Startup Screen","License Information")
    If Not WinActive("Drive SnapShot Startup Screen","License Information") Then WinActivate("Drive SnapShot Startup Screen","License Information")
    WinWaitActive("Drive SnapShot Startup Screen","License Information")
    Sleep(1000)
    Send("{ALTDOWN}e{ALTUP}")
    Sleep(1000)


    Vielleicht kann mir ja jemand helfen.
    Danke schonmal :)

    Gruß Andi

  • hello und welcome hier im forum =)
    so eine simple möglichkeit zu warten bis der OK-Button erschein einfach prüfen ob das prog schon zu 100% durchgelaufen ist....via schleife

    [autoit]

    do
    Sleep(10000);wartet 10 sekunden
    until WinExists ( "C: 100% - Snapshot")

    [/autoit]


    ode sowas in der art...unteranderem würd ich ich es anstatt mit send vll einfach mal mit controlclick versuchen...UND ganz wichtig das Semikolon (;) ist in autoit für kommentare gedacht!!
    sowas wie

    [autoit]

    MsgBox(0,"","text";) FALSCH

    [/autoit]

    kommentiert die letzte klammer aus!!!->falsch

    [autoit]

    MsgBox(0,"","text") ;dein kommentar kommt erst hier hin...richtig

    [/autoit]

    hingegen ist richtig....


    snoozer

  • Gut dann teste ich das mal.
    Danke.

    Das mit den ; im Skript hat der mir hier selbst eingefügt, da er aus allem n Smile gemacht hat.
    Habs nochmal reinkopiert.
    Jetzt sollts richtig angezeigt werden.

    Gruß Andi

  • Hat funktioniert :)

    !!! VIELEN DANK !!!

    Du hast mir dabei echt geholfen.

    Gruß Andi