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