Offene Fragen

  • Ich habe hier zu diesem schönen Script noch ein paar offene Fragen:
    1. Wie bekomme ich es hin, dass er mir nach dem Befehl as_Body[] immer in der Mail ein Enter macht?
    2. Wie bekomme ich es hin, dass er 2 Stellen nur nach dem Komma die Gigabyte Zahl schreibt und zusätzlich den Freien DiskSpace in % angibt!
    3. Wie bekomme ich es hin, dass er das Programm ausführt und alle Dialogfelder mit "OK" bestätigt, statt immer den Befehl
    SEND("ENTER") 17x zu schreiben am Ende des Scripts!

    Vielen Dank, hier nun das Script:

    Spoiler anzeigen
    [autoit]


    #include <INet.au3>

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ //COESSS001
    $COESSS001C = DriveSpaceFree( "\\COESSS001\c$" ) / 1024
    MsgBox(4096, "Freier Speicherplatz auf C:\", $COESSS001C & " GB")
    ;Ausrechnung des freien Speichers auf Laufwerk D:\
    $COESSS001D = DriveSpaceFree( "\\COESSS001\d$" ) /1024
    MsgBox(4096, "Freier Speicherplatz auf D:\", $COESSS001D & " GB")

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

    ;Asrechnung des freien Speichers auf Laufwerk C:\ //COESSS002
    $COESSS002C = DriveSpaceFree( "\\COESSS002\c$" ) / 1024
    MsgBox(4096, "Freier Speicherplatz auf C:\", $COESSS002C & " GB")

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

    ;Ausrechnung des freien Speichers auf Laufwerk D:\
    $COESSS002D = DriveSpaceFree( "\\COESSS002\d$" ) /1024
    MsgBox(4096, "Freier Speicherplatz auf D:\", $COESSS002D & " GB")

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

    ;Asrechnung des freien Speichers auf Laufwerk C:\ //COESSS003
    $COESSS003C = DriveSpaceFree( "\\COESSS003\c$" ) / 1024
    MsgBox(4096, "Freier Speicherplatz auf C\:", $COESSS003C & " GB")
    ;Ausrechnung des freien Speichers auf Laufwerk D:\
    $COESSS003D = DriveSpaceFree( "\\COESSS003\d$" ) /1024
    MsgBox(4096, "Freier Speicherplatz auf D:\", $COESSS003D & " GB")

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

    ;Asrechnung des freien Speichers auf Laufwerk C:\ //COESSS004
    $COESSS004C = DriveSpaceFree( "\\COESSS004\c$" ) / 1024
    MsgBox(4096, "Freier Speicherplatz auf C:\", $COESSS004C & " GB")
    ;Ausrechnung des freien Speichers auf Laufwerk D:\
    $COESSS004D = DriveSpaceFree( "\\COESSS004\d$" ) /1024
    MsgBox(4096, "Freier Speicherplatz auf D:\", $COESSS004D & " GB")

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

    ;Asrechnung des freien Speichers auf Laufwerk C:\ //COESSS005
    $COESSS005C = DriveSpaceFree( "\\COESSS005\c$" ) / 1024
    MsgBox(4096, "Freier Speicherplatz auf C:\", $COESSS005C & " GB")
    ;Ausrechnung des freien Speichers auf Laufwerk D:\
    $COESSS005D = DriveSpaceFree( "\\COESSS005\d$" ) /1024
    MsgBox(4096, "Freier Speicherplatz auf D:\", $COESSS005D & " GB")

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

    ;Asrechnung des freien Speichers auf Laufwerk C:\ //COESSS007
    $COESSS007C = DriveSpaceFree( "\\COESSS007\c$" ) / 1024
    MsgBox(4096, "Freier Speicherplatz auf C:\", $COESSS007C & " GB")
    ;Ausrechnung des freien Speichers auf Laufwerk D:\
    $COESSS007D = DriveSpaceFree( "\\COESSS007\d$" ) /1024
    MsgBox(4096, "Freier Speicherplatz auf D:\", $COESSS007D & " GB")

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

    ;Asrechnung des freien Speichers auf Laufwerk C:\ //COESSS008
    $COESSS008C = DriveSpaceFree( "\\COESSS008\c$" ) / 1024
    MsgBox(4096, "Freier Speicherplatz auf C:\", $COESSS008C & " GB")
    ;Ausrechnung des freien Speichers auf Laufwerk D:\
    $COESSS008D = DriveSpaceFree( "\\COESSS008\d$" ) /1024
    MsgBox(4096, "Freier Speicherplatz auf D:\", $COESSS008D & " GB")

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

    ;Asrechnung des freien Speichers auf Laufwerk C:\ //COESSS009
    $COESSS009C = DriveSpaceFree( "\\COESSS009\c$" ) / 1024
    MsgBox(4096, "Freier Speicherplatz auf C:\", $COESSS009C & " GB")
    ;Ausrechnung des freien Speichers auf Laufwerk D:\
    $COESSS009D = DriveSpaceFree( "\\COESSS009\d$" ) /1024
    MsgBox(4096, "Freier Speicherplatz auf D:\", $COESSS009D & " GB")

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

    ; E-Mail Senden
    $s_SmtpServer = "coesss001.colsman.local"
    $s_FromName = ""
    $s_FromAddress = ""
    $s_ToAddress = ""
    $s_Subject = "Free Disk Space"
    Dim $as_Body[16]
    $as_Body[0] = "Freier Speicherplatz auf C:\ :"& $COESSS001C & " GB"
    $as_Body[1] = "Freier Speicherplatz auf D:\ :"& $COESSS001D & " GB"
    $as_Body[2] = "Freier Speicherplatz auf C:\ :"& $COESSS002C & " GB"
    $as_Body[3] = "Freier Speicherplatz auf D:\ :"& $COESSS002D & " GB"
    $as_Body[4] = "Freier Speicherplatz auf C:\ :"& $COESSS003C & " GB"
    $as_Body[5] = "Freier Speicherplatz auf D:\ :"& $COESSS003D & " GB"
    $as_Body[6] = "Freier Speicherplatz auf C:\ :"& $COESSS004C & " GB"
    $as_Body[7] = "Freier Speicherplatz auf D:\ :"& $COESSS004D & " GB"
    $as_Body[8] = "Freier Speicherplatz auf C:\ :"& $COESSS005C & " GB"
    $as_Body[9] = "Freier Speicherplatz auf D:\ :"& $COESSS005D & " GB"
    $as_Body[10] = "Freier Speicherplatz auf C:\ :"& $COESSS007C & " GB"
    $as_Body[11] = "Freier Speicherplatz auf D:\ :"& $COESSS007D & " GB"
    $as_Body[12] = "Freier Speicherplatz auf C:\ :"& $COESSS008C & " GB"
    $as_Body[13] = "Freier Speicherplatz auf D:\ :"& $COESSS008D & " GB"
    $as_Body[14] = "Freier Speicherplatz auf C:\ :"& $COESSS009C & " GB"
    $as_Body[15] = "Freier Speicherplatz auf D:\ :"& $COESSS009D & " GB"
    $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1)
    $err = @error
    If $Response = 1 Then
    MsgBox(0, "Success!", "Mail sent")
    Else
    MsgBox(0, "Error!", "Mail failed with error code " & $err)
    EndIf

    [/autoit]

    3 Mal editiert, zuletzt von Lupos (10. Februar 2011 um 18:42)

  • Hallo lupos,

    echte Daten haben in einem Skript nichts verloren, also entferne die Absender und Empfänger-Mail Adressen.

    zu 1. funktioniert ein weiteres

    [autoit]

    Dim $as_Body[17]

    [/autoit]

    nicht?
    zu 2. schau dir

    [autoit]

    StringFormat

    [/autoit]

    an
    zu 3. sehe kein einziges send

    mfg autoBert

  • Zu 1: Funktioniert nicht!

    Zu 2: Komme nicht weiter habe das hier eingegeben, das scheint falsch zu sein kriege aber kein Error:

    [autoit]


    MsgBox(4096, "Freier Speicherplatz auf C:\",StringFormat( $COESSS009C & " GB"))

    [/autoit]


    Zu 3. Am Ende steht noch, habe ich aber nicht im Code oben hingeschrieben, da es sicherlich eine einfachere Lösung gibt!
    17x SEND("ENTER") ; damit er alle Dialogfelder mit OK bestätigt, geht das vereinfacht?

    Grüße Lupos

  • Hallo lupos,

    zu 1. dann hänge auch ein Zeile mit einem Leerzeichen an
    zu 2. kann keine Infos eines "format Control" erkennen, lass das Beispiel in der Hilfe laufen
    zu 3. wenn du deine eigenen MsgBoxen meinst, dann nimm den TimeOut-Parameter

    mfg autoBert

  • Hat leider nicht funktioniert so:
    Edit. FUNTZT das schon mal :)

    [autoit]

    $as_Body[0] = "Freier Speicherplatz auf C:\ :"& $COESSS001C & " GB" &@CRLF

    [/autoit]

    Einmal editiert, zuletzt von Lupos (10. Februar 2011 um 16:33)

  • Ahh ok, dann pfeiff ich mir das rein und wie kann ich die freien GB nun noch als % darstellen?

    Vielen Dank

    Grüße Lupos

  • Hallo lupos,

    den Dreisatz wirst du wohl können, aber hier ein Beispiel

    [autoit]

    #include <string.au3>

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

    $nTotal = DriveSpaceTotal("c:")
    $nFree = DriveSpaceFree("c:")
    $nPer = $nFree / $nTotal * 100
    ConsoleWrite(StringFormat("%.2f GB frei von %.2f = %2f %", $nFree, $nTotal, $nPer) & @CRLF)

    [/autoit]
  • Hallo lupos,

    was funktioniert an diesem kleinen Skript nicht:

    [autoit]

    #include <string.au3>

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

    $nTotal = DriveSpaceTotal("c:")
    $nFree = DriveSpaceFree("c:")
    $nPer = $nFree / $nTotal * 100
    ConsoleWrite(StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer) & @CRLF)

    [/autoit]

    hast du es überhaupt gestartet, wenn ja welche Fehlermeldung?
    Ich erhalte wie gewünscht folgende Zeile in der Konsole ausgegeben:

    Code
    66863.46 GB frei von 147628.56 GB = 45.29 %

    Oder scheiterst du beim einbauen in dein Skript?

    mfg autoBert

  • Ja, ich scheitere im Einbau in mein Script und könntest du mir das mit den Kommazahlen erklären?
    Das Script aus der Hilfe läuf, aber verstehe das mit den Kommatar nicht möchte ja nur 2 stellen hinter dem Punkt, aber egal wie ich meine Funktion ändere = error!
    Wäre auch schön, wenn er die Prozente dann auch nur noch 2 stellen hinter dem Punkt schreibt, und zwar korrekt und nicht 0.5% :), müssten glaube 50 % sein, aber entwede /1024 dann kriege ich die richtige GB Zahl oder *100 / 1024, dann bekomme ich die falsche % Zahl!

    [autoit]


    StringFormat ; Hilft mir leider nicht weiter....

    [/autoit]

    Grüße Lupos

  • Ineluki,

    hät ich gerne

    also jetzt noch einmal ganz korrekt

    [autoit]

    #include <string.au3>

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

    $nTotal = DriveSpaceTotal("c:") / 1024
    $nFree = DriveSpaceFree("c:") / 1024
    $nPer = $nFree / $nTotal * 100
    ConsoleWrite(StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer) & @CRLF)

    [/autoit]


    ergibt

    Code
    65.20 GB frei von 144.17 GB = 45.23 %

    in der Konsolenasgabe
    mfg autoBert

  • Das nunn als MsgBox ausgegeben bzw. in mein Script eingebaut :) , oder schreibt er genau die Werte danach in die Email?

    Grüße Lupos

  • Hallo lupos,

    nein dies ist nur ein Skript zur Demo von StringFormat. Für deine Zwecke wäre dies etwa leichter umzusetzen (hoffe ich):

    [autoit]

    #include <string.au3>

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

    $sInfoC = _DriveInfo("c:")
    MsgBox(0,"Driveinfo für C:",$sInfoC,5)
    $sInfoD = _DriveInfo("d:")
    MsgBox(0,"Driveinfo für D:",$sInfoD,5)

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

    Func _DriveInfo($sDrive)
    $nTotal = DriveSpaceTotal($sDrive) / 1024
    $nFree = DriveSpaceFree($sDrive) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

    [/autoit]

    die gespeicherten Infos kannst du dann in deine Email einbauen. Den Ret solltest du jetzt aber alleine hinbekommen,

    mfg autoBert

    Einmal editiert, zuletzt von autoBert (10. Februar 2011 um 18:05)

  • Mein Script funktioniert nun nicht mehr, er sagt mir nun in Zeile 24, folgenden Error: Duplicate FunctionsName

    Spoiler anzeigen
    [autoit]


    #include <INet.au3>
    #include <string.au3>

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS001
    $sInfoCOESSS001C = _DriveInfo("\\COESSS001\c$")
    $sInfoCOESSS001D = _DriveInfo("\\COESSS001\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    Func _DriveInfo($sDriveCOESSS001)
    $nTotal = DriveSpaceTotal($sDriveCOESSS001) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS001) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS002
    $sInfoCOESSS002C = _DriveInfo("\\COESSS002\c$")
    $sInfoCOESSS002D = _DriveInfo("\\COESSS002\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    Func _DriveInfo($sDriveCOESSS002)
    $nTotal = DriveSpaceTotal($sDriveCOESSS002) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS002) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS003
    $sInfoCOESSS003C = _DriveInfo("\\COESSS003\c$")
    $sInfoCOESSS003D = _DriveInfo("\\COESSS003\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    Func _DriveInfo($sDriveCOESSS003)
    $nTotal = DriveSpaceTotal($sDriveCOESSS003) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS003) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS004
    $sInfoCOESSS004C = _DriveInfo("\\COESSS004\c$")
    $sInfoCOESSS004D = _DriveInfo("\\COESSS004\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    Func _DriveInfo($sDriveCOESSS004)
    $nTotal = DriveSpaceTotal($sDriveCOESSS004) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS004) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS005
    $sInfoCOESSS005C = _DriveInfo("\\COESSS005\c$")
    $sInfoCOESSS005D = _DriveInfo("\\COESSS005\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    Func _DriveInfo($sDriveCOESSS005)
    $nTotal = DriveSpaceTotal($sDriveCOESSS005) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS005) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS007
    $sInfoCOESSS007C = _DriveInfo("\\COESSS007\c$")
    $sInfoCOESSS007D = _DriveInfo("\\COESSS007\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    Func _DriveInfo($sDriveCOESSS007)
    $nTotal = DriveSpaceTotal($sDriveCOESSS007) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS007) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS008
    $sInfoCOESSS008C = _DriveInfo("\\COESSS008\c$")
    $sInfoCOESSS008D = _DriveInfo("\\COESSS008\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    Func _DriveInfo($sDriveCOESSS008)
    $nTotal = DriveSpaceTotal($sDriveCOESSS008) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS008) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS009
    $sInfoCOESSS009C = _DriveInfo("\\COESSS009\c$")
    $sInfoCOESSS009D = _DriveInfo("\\COESSS009\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    Func _DriveInfo($sDriveCOESSS009)
    $nTotal = DriveSpaceTotal($sDriveCOESSS009) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS009) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc
    ; E-Mail Senden
    $s_SmtpServer = "l"
    $s_FromName = ""
    $s_FromAddress = ""
    $s_ToAddress = ""
    $s_Subject = "Free Disk Space"
    Dim $as_Body[16]
    $as_Body[0] = "Freier Speicherplatz auf COESSS001 C:\ :"& $InfoCOESSS001C & " GB" &@CRLF
    $as_Body[1] = "Freier Speicherplatz auf COESSS001 D:\ :"& $InfoCOESSS001D & " GB" &@CRLF
    $as_Body[2] = "Freier Speicherplatz auf COESSS002 C:\ :"& $INfoCOESSS002C & " GB" &@CRLF
    $as_Body[3] = "Freier Speicherplatz auf COESSS002 D:\ :"& $InfoCOESSS002D & " GB" &@CRLF
    $as_Body[4] = "Freier Speicherplatz auf COESSS003 C:\ :"& $InfoCOESSS003C & " GB" &@CRLF
    $as_Body[5] = "Freier Speicherplatz auf COESSS003 D:\ :"& $InfoCOESSS003D & " GB" &@CRLF
    $as_Body[6] = "Freier Speicherplatz auf COESSS004 C:\ :"& $InfoCOESSS004C & " GB" &@CRLF
    $as_Body[7] = "Freier Speicherplatz auf COESSS004 D:\ :"& $InfoCOESSS004D & " GB" &@CRLF
    $as_Body[8] = "Freier Speicherplatz auf COESSS005 C:\ :"& $InfoCOESSS005C & " GB" &@CRLF
    $as_Body[9] = "Freier Speicherplatz auf COESSS005 D:\ :"& $InfoCOESSS005D & " GB" &@CRLF
    $as_Body[10] = "Freier Speicherplatz auf COESSS007 C:\ :"& $InfoCOESSS007C & " GB" &@CRLF
    $as_Body[11] = "Freier Speicherplatz auf COESSS007 D:\ :"& $InfoCOESSS007D & " GB" &@CRLF
    $as_Body[12] = "Freier Speicherplatz auf COESSS008 C:\ :"& $InfoCOESSS008C & " GB" &@CRLF
    $as_Body[13] = "Freier Speicherplatz auf COESSS008 D:\ :"& $InfoCOESSS008D & " GB" &@CRLF
    $as_Body[14] = "Freier Speicherplatz auf COESSS009 C:\ :"& $InfoCOESSS009C & " GB" &@CRLF
    $as_Body[15] = "Freier Speicherplatz auf COESSS009 D:\ :"& $InfoCOESSS009D & " GB" &@CRLF
    $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1)
    $err = @error
    If $Response = 1 Then
    MsgBox(0, "Success!", "Mail sent")
    Else
    MsgBox(0, "Error!", "Mail failed with error code " & $err)
    EndIf

    [/autoit]

    Was ist nun Falsch?

    Grüße Lupos

    • Offizieller Beitrag
    Spoiler anzeigen
    [autoit]

    #include <INet.au3>
    #include <string.au3>

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS001
    $sInfoCOESSS001C = _DriveInfo("\\COESSS001\c$")
    $sInfoCOESSS001D = _DriveInfo("\\COESSS001\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS002
    $sInfoCOESSS002C = _DriveInfo("\\COESSS002\c$")
    $sInfoCOESSS002D = _DriveInfo("\\COESSS002\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS003
    $sInfoCOESSS003C = _DriveInfo("\\COESSS003\c$")
    $sInfoCOESSS003D = _DriveInfo("\\COESSS003\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS004
    $sInfoCOESSS004C = _DriveInfo("\\COESSS004\c$")
    $sInfoCOESSS004D = _DriveInfo("\\COESSS004\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS005
    $sInfoCOESSS005C = _DriveInfo("\\COESSS005\c$")
    $sInfoCOESSS005D = _DriveInfo("\\COESSS005\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS007
    $sInfoCOESSS007C = _DriveInfo("\\COESSS007\c$")
    $sInfoCOESSS007D = _DriveInfo("\\COESSS007\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS008
    $sInfoCOESSS008C = _DriveInfo("\\COESSS008\c$")
    $sInfoCOESSS008D = _DriveInfo("\\COESSS008\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    ;Ausrechnung des freien Speichers auf Laufwerk C:\ & D:\ auf dem Server //COESSS009
    $sInfoCOESSS009C = _DriveInfo("\\COESSS009\c$")
    $sInfoCOESSS009D = _DriveInfo("\\COESSS009\d$")
    MsgBox(0,"Driveinfo für C:\",$sInfoC)
    MsgBox(0,"Driveinfo für D:\",$sInfoD)

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

    ; E-Mail Senden
    $s_SmtpServer = "l"
    $s_FromName = ""
    $s_FromAddress = ""
    $s_ToAddress = ""
    $s_Subject = "Free Disk Space"
    Dim $as_Body[16]
    $as_Body[0] = "Freier Speicherplatz auf COESSS001 C:\ :"& $InfoCOESSS001C & " GB" &@CRLF
    $as_Body[1] = "Freier Speicherplatz auf COESSS001 D:\ :"& $InfoCOESSS001D & " GB" &@CRLF
    $as_Body[2] = "Freier Speicherplatz auf COESSS002 C:\ :"& $INfoCOESSS002C & " GB" &@CRLF
    $as_Body[3] = "Freier Speicherplatz auf COESSS002 D:\ :"& $InfoCOESSS002D & " GB" &@CRLF
    $as_Body[4] = "Freier Speicherplatz auf COESSS003 C:\ :"& $InfoCOESSS003C & " GB" &@CRLF
    $as_Body[5] = "Freier Speicherplatz auf COESSS003 D:\ :"& $InfoCOESSS003D & " GB" &@CRLF
    $as_Body[6] = "Freier Speicherplatz auf COESSS004 C:\ :"& $InfoCOESSS004C & " GB" &@CRLF
    $as_Body[7] = "Freier Speicherplatz auf COESSS004 D:\ :"& $InfoCOESSS004D & " GB" &@CRLF
    $as_Body[8] = "Freier Speicherplatz auf COESSS005 C:\ :"& $InfoCOESSS005C & " GB" &@CRLF
    $as_Body[9] = "Freier Speicherplatz auf COESSS005 D:\ :"& $InfoCOESSS005D & " GB" &@CRLF
    $as_Body[10] = "Freier Speicherplatz auf COESSS007 C:\ :"& $InfoCOESSS007C & " GB" &@CRLF
    $as_Body[11] = "Freier Speicherplatz auf COESSS007 D:\ :"& $InfoCOESSS007D & " GB" &@CRLF
    $as_Body[12] = "Freier Speicherplatz auf COESSS008 C:\ :"& $InfoCOESSS008C & " GB" &@CRLF
    $as_Body[13] = "Freier Speicherplatz auf COESSS008 D:\ :"& $InfoCOESSS008D & " GB" &@CRLF
    $as_Body[14] = "Freier Speicherplatz auf COESSS009 C:\ :"& $InfoCOESSS009C & " GB" &@CRLF
    $as_Body[15] = "Freier Speicherplatz auf COESSS009 D:\ :"& $InfoCOESSS009D & " GB" &@CRLF
    $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @computername, -1)
    $err = @error
    If $Response = 1 Then
    MsgBox(0, "Success!", "Mail sent")
    Else
    MsgBox(0, "Error!", "Mail failed with error code " & $err)
    EndIf

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

    Func _DriveInfo($sDriveCOESSS009)
    $nTotal = DriveSpaceTotal($sDriveCOESSS009) / 1024
    $nFree = DriveSpaceFree($sDriveCOESSS009) / 1024
    $nPer = $nFree / $nTotal * 100
    Return StringFormat("%.2f GB frei von %.2f GB = %.2f %", $nFree, $nTotal, $nPer)
    EndFunc

    [/autoit]