1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. teh_hahn

Beiträge von teh_hahn

  • Festplattenspeicherüberpfüfung für Server mit Warnfunktion

    • teh_hahn
    • 31. Mai 2007 um 08:46

    Ja, legst Dir halt ein Array von A: bis Z: an. Wenn Du irgend ein Problem bei der Umsetzung hast, einfach melden!

  • Festplattenspeicherüberpfüfung für Server mit Warnfunktion

    • teh_hahn
    • 31. Mai 2007 um 07:59

    Ja, wie gesagt, baust Dir ein Array:

    Spoiler anzeigen
    [autoit]

    Local $i_drives = 5
    Local $a_driveletters[$i_drives] = ["C:", "D:", "E:", "F:", "G:"]
    Local $a_drivetotalspaces[$i_drives] = [-1, -1, -1, -1, -1]

    [/autoit]


    oder halt soviele wie Du hast und dann machst ne For-Schleife:

    Spoiler anzeigen
    [autoit]

    For $i = 0 To UBound($a_driveletters, 1) - 1 Step 1
    If DriveGetType($a_driveletters[$i]) = "Fixed" Then
    $a_drivetotalspaces[$i] =DriveSpaceTotal($a_driveletters[$i] & "\")
    EndIf
    Next

    [/autoit]


    usw. Kannst dann ja beliebieg aufbohren, wenn Du dann alle Infos hast schickst Du sie per SMTP weg - fertig...

  • Festplattenspeicherüberpfüfung für Server mit Warnfunktion

    • teh_hahn
    • 30. Mai 2007 um 18:10

    Ja, bastelst halt einen "Client", der Systeminfos sammelt. Identifizieren kannst Du doch den Server anhand seines Hostnames / IP-Adresse (Könnte der Betreff sein, z.B. "SysReport from [HOSTNAME] " & _Now()" oder so.
    Dann bastelst Dir eine Config (am leichtesten INI) und schreibst da Empfänger usw. rein, halt alles was dynamisch sein soll. Dann schreibst Dir ein Skript, was ein Netzlaufwerk zu jedem Server aufmacht, das SysReport Skript rüberkopiert und dann führst du es mit PSExec.exe oder so aus...

    PS: Was meinst Du mit Festplattenbezeichnung? Kannst doch auch alles dynamisch halten...

  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 30. Mai 2007 um 14:57

    ROFL!

    Ich hab es jetzt... Ich Paddel frag die Ganze Zeit mit DeviceID=1 ab, das erste Device ist aber 0... Tja, manchmal sinds die kleinen Dinge.

    So jetzt: VIELEN DANK!

  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 30. Mai 2007 um 13:50

    Hi,

    habe das _ClewareResetDevice($h_dll, $ptr_cusbaccess, 1) jetzt rausgenommen. Und mit dem Rückgabewert hast Du Recht, hab mich falsch ausgedrückt. Wenn ich das aber richtig verstehe, dann beinhaltet

    [autoit]

    $d_temperature = DllStructGetData($struct_temp, 1)
    $i_time = DllStructGetData($struct_time, 1)

    [/autoit]


    ja die Temperatur und die Zeit. Habs jetzt mal richtig gestellt mit der Abfrage des Rückgabewertes der Funktion, aber sie lässt sich nicht aufrufen...

    Am Gerät kann es nicht liegen. Mit dem C++ Tool kappt es wie gesagt...

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon
    #include <Array.au3>
    #include <GUIConstants.au3>
    Opt("GUICloseOnESC", 0)
    Opt("MustDeclareVars", 1)
    Opt("RunErrorsFatal", 0)

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

    main()

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

    Func _ClewareInit($h_dll)
    Local $ptr_cw = DllCall($h_dll, "ptr", "_FCWInitObject@0")

    If IsArray($ptr_cw) == 0 Or $ptr_cw[0] == 0 Then
    MsgBox(16, "Error", "Invalid address on FCWInitOject!")
    Exit (1)
    EndIf

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

    Return ($ptr_cw[0])
    EndFunc ;==>_ClewareInit

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

    Func _ClewareUnInit($h_dll, $ptr_cusbaccess)
    DllCall($h_dll, "ptr", "_FCWUnInitObject@4", "ptr", $ptr_cusbaccess)
    EndFunc ;==>_ClewareUnInit

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

    Func _ClewareOpen($h_dll, $ptr_cusbaccess)
    Local $i_cwdevices = DllCall($h_dll, "int", "_FCWOpenCleware@4", "ptr", $ptr_cusbaccess)

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

    Return ($i_cwdevices[0])
    EndFunc ;==>_ClewareOpen

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

    Func _ClewareClose($h_dll, $ptr_cusbaccess)
    DllCall($h_dll, "int", "_FCWCloseCleware@4", "ptr", $ptr_cusbaccess)
    EndFunc ;==>_ClewareClose

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

    Func _ClewareGetDLLVersion($h_dll)
    Local $i_cwversion = DllCall($h_dll, "int", "_FCWGetDLLVersion@0")

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

    Return ($i_cwversion[0])
    EndFunc ;==>_ClewareGetDLLVersion

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

    Func _ClewareResetDevice($h_dll, $ptr_cusbaccess, $i_device)
    DllCall($h_dll, "int", "_FCWResetDevice@8", "ptr", $ptr_cusbaccess, "int", $i_device)
    EndFunc ;==>_ClewareResetDevice

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

    Func _ClewareGetTemperature($h_dll, $ptr_cusbaccess)
    Local $a_cwtempsuccess = -1
    Local $struct_time, $struct_temp, $i_cwtempsuccess, $i_deviceid, $i_time = 0
    Local $d_temperature = 0.0

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

    $i_deviceid = _ClewareOpen($h_dll, $ptr_cusbaccess)
    If $i_deviceid >= 1 Then
    MsgBox(64, "Cleware", "Number of Devices: " & $i_deviceid)
    ;~ _ClewareResetDevice($h_dll, $ptr_cusbaccess, 1)

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

    $struct_time = DllStructCreate("int")
    DllStructSetData($struct_time, 1, 0)
    $struct_temp = DllStructCreate("double")
    DllStructSetData($struct_temp, 1, 0)
    $a_cwtempsuccess = DllCall($h_dll, "int", "_FCWGetTemperature@16", _
    "ptr", $ptr_cusbaccess, _
    "int", 1, _
    "ptr", DllStructGetPtr($struct_temp), _
    "ptr", DllStructGetPtr($struct_time))
    _ArrayDisplay($a_cwtempsuccess)
    If $a_cwtempsuccess[0] == 0 Then
    MsgBox(64, "Error", "Error on FCWGetTemperature!")
    Else
    Select
    Case @error == 0
    $d_temperature = DllStructGetData($struct_temp, 1)
    $i_time = DllStructGetData($struct_time, 1)
    MsgBox(64, "Cleware", "Temperature: " & $d_temperature & " °C." & @CR & "Time: " & $i_time & ".")
    Case @error == 1
    MsgBox(16, "Error", "Unable to use DLL.")
    Case @error == 2
    MsgBox(16, "Error", "Unknown return type.")
    Case @error == 3
    MsgBox(16, "Error", "Function not found in DLL.")
    EndSelect
    EndIf
    EndIf
    EndFunc ;==>_ClewareGetTemperature

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

    Func main()
    Local Const $S_APPTITLE = "Get USBTemp"
    Local Const $S_APPVERSION = "1.0"
    Local Const $S_DLLPATH = @ScriptDir & "\USBaccess.dll"
    Local $a_msg = -1

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

    Local $h_maingui = GUICreate($S_APPTITLE & " v" & $S_APPVERSION, 320, 240, -1, -1)
    Local $h_readtempbt = GUICtrlCreateButton("&Read Temperature", 10, 10, 120, 20)
    Local $h_readversionbt = GUICtrlCreateButton("&DLL Version", 160, 10, 120, 20)

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

    Local $h_dll = DllOpen($S_DLLPATH)
    If $h_dll == -1 Then
    MsgBox(16, "Error", 'Unable to open "' & $S_DLLPATH & '".')
    Exit (1)
    EndIf
    Local $ptr_cusbaccess = _ClewareInit($h_dll)

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

    GUISetState(@SW_SHOW, $h_maingui)
    While 1
    $a_msg = GUIGetMsg(1)
    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop 1
    Case $a_msg[0] == $h_readtempbt
    _ClewareGetTemperature($h_dll, $ptr_cusbaccess)
    Case $a_msg[0] == $h_readversionbt
    MsgBox(64, "Cleware", "DLL Version: " & _ClewareGetDLLVersion($h_dll))
    EndSelect
    WEnd
    GUIDelete($h_maingui)
    _ClewareUnInit($h_dll, $ptr_cusbaccess)
    DllClose($h_dll)
    Exit (0)
    EndFunc ;==>main

    [/autoit]
  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 30. Mai 2007 um 11:11

    Oh, das hatte ich ja ganz übersehen. hab mir nochmal die Doku angeschaut. ich dachte bislang die Funktion liefert nur einen Wert zurück und zwar die Temperatur, also müssen wir die Werte aus dem Struct auslesen.

    Hab meinen Code mal eben vervollständigt, aber beide Werte geben nur 0 zurück, was für einen Fehler steht.

    Spoiler anzeigen
    [autoit]

    ;~ Including external files / Changing the operation of AutoIt functions/parameters.
    ;~ ----------------------------------------------------------------------------
    #NoTrayIcon
    #include <Array.au3>
    #include <GUIConstants.au3>
    Opt("GUICloseOnESC", 0)
    Opt("MustDeclareVars", 1)
    Opt("RunErrorsFatal", 0)
    ;~ -----------------------------------------------------------------------------
    main()

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

    Func _ClewareInit($h_dll)
    Local $ptr_cw = DllCall($h_dll, "ptr", "_FCWInitObject@0")

    If IsArray($ptr_cw) == 0 Or $ptr_cw[0] == 0 Then
    MsgBox(16, "Error", "Invalid address on FCWInitOject!")
    Exit (1)
    EndIf

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

    Return ($ptr_cw[0])
    EndFunc ;==>_ClewareInit

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

    Func _ClewareUnInit($h_dll, $ptr_cusbaccess)
    DllCall($h_dll, "ptr", "_FCWUnInitObject@4", "ptr", $ptr_cusbaccess)
    EndFunc ;==>_ClewareUnInit

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

    Func _ClewareOpen($h_dll, $ptr_cusbaccess)
    Local $i_cwdevices = DllCall($h_dll, "int", "_FCWOpenCleware@4", "ptr", $ptr_cusbaccess)

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

    Return ($i_cwdevices[0])
    EndFunc ;==>_ClewareOpen

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

    Func _ClewareClose($h_dll, $ptr_cusbaccess)
    DllCall($h_dll, "int", "_FCWCloseCleware@4", "ptr", $ptr_cusbaccess)
    EndFunc ;==>_ClewareClose

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

    Func _ClewareGetDLLVersion($h_dll)
    Local $i_cwversion = DllCall($h_dll, "int", "_FCWGetDLLVersion@0")

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

    Return ($i_cwversion[0])
    EndFunc ;==>_ClewareGetDLLVersion

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

    Func _ClewareResetDevice($h_dll, $ptr_cusbaccess, $i_device)
    DllCall($h_dll, "int", "_FCWResetDevice@8", "ptr", $ptr_cusbaccess, "int", $i_device)
    EndFunc ;==>_ClewareResetDevice

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

    Func _ClewareGetTemperature($h_dll, $ptr_cusbaccess)
    Local $struct_time, $struct_temp, $i_deviceid, $i_time = 0
    Local $d_temperature = 0.0

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

    $i_deviceid = _ClewareOpen($h_dll, $ptr_cusbaccess)
    If $i_deviceid == 1 Then
    MsgBox(64, "Cleware", "Number of Devices: " & $i_deviceid)
    _ClewareResetDevice($h_dll, $ptr_cusbaccess, 1)

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

    $struct_time = DllStructCreate("int")
    DllStructSetData($struct_time, 1, 0)
    $struct_temp = DllStructCreate("double")
    DllStructSetData($struct_temp, 1, 0)
    DllCall($h_dll, "int", "_FCWGetTemperature@16", _
    "ptr", $ptr_cusbaccess, _
    "int", 1, _
    "ptr", DllStructGetPtr($struct_temp), _
    "ptr", DllStructGetPtr($struct_time))
    Select
    Case @error == 0
    $d_temperature = DllStructGetData($struct_temp, 1)
    $i_time = DllStructGetData($struct_time, 1)
    MsgBox(64, "Cleware", "Temperature: " & $d_temperature & " °C." & @CR & "Time: " & $i_time & ".")
    Case @error == 1
    MsgBox(16, "Error", "Unable to use DLL.")
    Case @error == 2
    MsgBox(16, "Error", "Unknown return type.")
    Case @error == 3
    MsgBox(16, "Error", "Function not found in DLL.")
    EndSelect
    EndIf
    EndFunc ;==>_ClewareGetTemperature

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

    Func main()
    Local Const $S_APPTITLE = "Get USBTemp"
    Local Const $S_APPVERSION = "1.0"
    Local Const $S_DLLPATH = @ScriptDir & "\USBaccess.dll"
    Local $a_msg = -1

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

    Local $h_maingui = GUICreate($S_APPTITLE & " v" & $S_APPVERSION, 320, 240, -1, -1)
    Local $h_readtempbt = GUICtrlCreateButton("&Read Temperature", 10, 10, 120, 20)
    Local $h_readversionbt = GUICtrlCreateButton("&DLL Version", 160, 10, 120, 20)

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

    Local $h_dll = DllOpen($S_DLLPATH)
    If $h_dll == -1 Then
    MsgBox(16, "Error", 'Unable to open "' & $S_DLLPATH & '".')
    Exit (1)
    EndIf
    Local $ptr_cusbaccess = _ClewareInit($h_dll)

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

    GUISetState(@SW_SHOW, $h_maingui)
    While 1
    $a_msg = GUIGetMsg(1)
    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop 1
    Case $a_msg[0] == $h_readtempbt
    _ClewareGetTemperature($h_dll, $ptr_cusbaccess)
    Case $a_msg[0] == $h_readversionbt
    MsgBox(64, "Cleware", "DLL Version: " & _ClewareGetDLLVersion($h_dll))
    EndSelect
    WEnd
    GUIDelete($h_maingui)
    _ClewareUnInit($h_dll, $ptr_cusbaccess)
    DllClose($h_dll)
    Exit (0)
    EndFunc ;==>main

    [/autoit]
  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 30. Mai 2007 um 10:49

    Ah ja, jetzt seh ich das auch (hab die Sternchen übersehen :D). Ergibt ja auch Sinn mit dem Struct (hab noch nie so wirklich was mit DLLs in AutoIt gemacht - begreife aber so langsam aber sicher...)

    Irgendwie funzt das aber immer noch nicht. Wenn ich mir die Werte in einem Array ausgeben lassen, so stehen da anscheinend nur die Speicheradressen drin. Wie komm ich den jetzt an die Temperatur?

    Spoiler anzeigen
    [autoit]

    ;~ Including external files / Changing the operation of AutoIt functions/parameters.
    ;~ ----------------------------------------------------------------------------
    #NoTrayIcon
    #include <Array.au3>
    #include <GUIConstants.au3>
    Opt("GUICloseOnESC", 0)
    Opt("MustDeclareVars", 1)
    Opt("RunErrorsFatal", 0)
    ;~ -----------------------------------------------------------------------------
    main()

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

    Func _ClewareInit($h_dll)
    Local $ptr_cw = DllCall($h_dll, "ptr", "_FCWInitObject@0")

    If IsArray($ptr_cw) == 0 Or $ptr_cw[0] == 0 Then
    MsgBox(16, "Error", "Invalid address on FCWInitOject!")
    Exit (1)
    EndIf

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

    Return ($ptr_cw[0])
    EndFunc ;==>_ClewareInit

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

    Func _ClewareUnInit($h_dll, $ptr_cusbaccess)
    DllCall($h_dll, "ptr", "_FCWUnInitObject@4", "ptr", $ptr_cusbaccess)
    EndFunc ;==>_ClewareUnInit

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

    Func _ClewareOpen($h_dll, $ptr_cusbaccess)
    Local $i_cwdevices = DllCall($h_dll, "int", "_FCWOpenCleware@4", "ptr", $ptr_cusbaccess)

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

    Return ($i_cwdevices[0])
    EndFunc ;==>_ClewareOpen

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

    Func _ClewareClose($h_dll, $ptr_cusbaccess)
    DllCall($h_dll, "int", "_FCWCloseCleware@4", "ptr", $ptr_cusbaccess)
    EndFunc

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

    Func _ClewareGetDLLVersion($h_dll)
    Local $i_cwversion = DllCall($h_dll, "int", "_FCWGetDLLVersion@0")

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

    Return ($i_cwversion[0])
    EndFunc ;==>_ClewareGetDLLVersion

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

    Func _ClewareResetDevice($h_dll, $ptr_cusbaccess, $i_device)
    DllCall($h_dll, "int", "_FCWResetDevice@8", "ptr", $ptr_cusbaccess, "int", $i_device)
    EndFunc ;==>_ClewareResetDevice

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

    Func _ClewareGetTemperature($h_dll, $ptr_cusbaccess)
    Local $i_deviceid, $i_time, $d_temperature, $a_cwtemperature = -1

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

    $i_deviceid = _ClewareOpen($h_dll, $ptr_cusbaccess)
    If $i_deviceid == 1 Then
    MsgBox(64, "Cleware", "Number of Devices: " & $i_deviceid)
    _ClewareResetDevice($h_dll, $ptr_cusbaccess, 1)

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

    $i_time = DllStructCreate("int")
    $d_temperature = DllStructCreate("double")
    DllStructSetData($i_time, 1, 0)
    DllStructSetData($d_temperature, 1, 0)
    $a_cwtemperature = DllCall($h_dll, "int", "_FCWGetTemperature@16", _
    "ptr", $ptr_cusbaccess, _
    "int", 1, _
    "ptr", DllStructGetPtr($d_temperature), _
    "ptr", DllStructGetPtr($i_time))

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

    Select
    Case @error == 0
    _ArrayDisplay($a_cwtemperature)
    MsgBox(64, "Cleware", "Temperatur: " & $a_cwtemperature[1] & " °C.")
    Case @error == 1
    MsgBox(16, "Error", "Unable to use DLL.")
    Case @error == 2
    MsgBox(16, "Error", "Unknown return type.")
    Case @error == 3
    MsgBox(16, "Error", "Function not found in DLL.")
    EndSelect
    EndIf
    EndFunc ;==>_ClewareGetTemperature

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

    Func main()
    Local Const $S_APPTITLE = "Get USBTemp"
    Local Const $S_APPVERSION = "1.0"
    Local Const $S_DLLPATH = @ScriptDir & "\USBaccess.dll"
    Local $a_msg = -1

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

    Local $h_maingui = GUICreate($S_APPTITLE & " v" & $S_APPVERSION, 320, 240, -1, -1)
    Local $h_readtempbt = GUICtrlCreateButton("&Read Temperature", 10, 10, 120, 20)
    Local $h_readversionbt = GUICtrlCreateButton("&DLL Version", 160, 10, 120, 20)

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

    Local $h_dll = DllOpen($S_DLLPATH)
    If $h_dll == -1 Then
    MsgBox(16, "Error", 'Unable to open "' & $S_DLLPATH & '".')
    Exit (1)
    EndIf
    Local $ptr_cusbaccess = _ClewareInit($h_dll)

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

    GUISetState(@SW_SHOW, $h_maingui)
    While 1
    $a_msg = GUIGetMsg(1)
    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop 1
    Case $a_msg[0] == $h_readtempbt
    _ClewareGetTemperature($h_dll, $ptr_cusbaccess)
    Case $a_msg[0] == $h_readversionbt
    MsgBox(64, "Cleware", "DLL Version: " & _ClewareGetDLLVersion($h_dll))
    EndSelect
    WEnd
    GUIDelete($h_maingui)
    _ClewareUnInit($h_dll, $ptr_cusbaccess)
    DllClose($h_dll)
    Exit (0)
    EndFunc ;==>main

    [/autoit]
  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 30. Mai 2007 um 09:45

    Mhh, Mist. Habe doch noch ein Problem. Kann zwar nun die Anzahl der Devices auslesen, nicht aber die Temperatur:

    Spoiler anzeigen
    [autoit]

    ;~ Including external files / Changing the operation of AutoIt functions/parameters.
    ;~ ----------------------------------------------------------------------------
    #NoTrayIcon
    #include <Array.au3>
    #include <GUIConstants.au3>
    Opt("GUICloseOnESC", 0)
    Opt("MustDeclareVars", 1)
    Opt("RunErrorsFatal", 0)
    ;~ -----------------------------------------------------------------------------
    main()

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

    Func _ClewareGetDLLVersion($h_dll)
    Local $i_cwversion = DllCall($h_dll, "int", "_FCWGetDLLVersion@0")

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

    Return ($i_cwversion[0])
    EndFunc ;==>_ClewareGetDLLVersion

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

    Func _ClewareInit($h_dll)
    Local $ptr_cw = DllCall($h_dll, "ptr", "_FCWInitObject@0")

    If IsArray($ptr_cw) == 0 Or $ptr_cw[0] == 0 Then
    MsgBox(16, "Error", "Invalid address on FCWInitOject!")
    Exit (1)
    EndIf

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

    Return ($ptr_cw[0])
    EndFunc ;==>_ClewareInit

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

    Func _ClewareGetTemp($h_dll, $ptr_cusbaccess)
    Local $a_cwdevices, $a_cwtemperature = -1
    Local $i_time, $d_temperature = 0

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

    $a_cwdevices = DllCall($h_dll, "int", "_FCWOpenCleware@4", "ptr", $ptr_cusbaccess)
    If $a_cwdevices[0] == 1 Then
    $a_cwtemperature = DllCall($h_dll, "int", "_FCWGetTemperature@16", "ptr", $ptr_cusbaccess, "int", 1, "ptr", $d_temperature, "int", $i_time)
    Select
    Case @error == 0
    _ArrayDisplay($a_cwtemperature)
    ;~ MsgBox(16, "Notification", "Temperatur: " & $a_cwtemperature[1] & " °C.")
    Case @error == 1
    MsgBox(16, "Error", "Unable to use DLL.")
    Case @error == 2
    MsgBox(16, "Error", "Unknown return type.")
    Case @error == 3
    MsgBox(16, "Error", "Function not found in DLL.")
    EndSelect
    EndIf
    EndFunc ;==>_ClewareGetTemp

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

    Func OnAutoItExit()
    GUIDelete($h_maingui)
    DllClose($h_dll)
    EndFunc ;==>OnAutoItExit

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

    Func main()
    Local Const $S_APPTITLE = "USB Temperature"
    Local Const $S_APPVERSION = "1.0"
    Local Const $S_DLLPATH = @ScriptDir & "\USBaccess.dll"
    Local $a_msg = -1

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

    Global $h_maingui = GUICreate($S_APPTITLE & " v" & $S_APPVERSION, 640, 480, -1, -1)
    Local $h_readtempbt = GUICtrlCreateButton("&Read Temperature", 10, 10, 120, 20)
    Local $h_readversionbt = GUICtrlCreateButton("&DLL Version", 160, 10, 120, 20)

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

    Global $h_dll = DllOpen($S_DLLPATH)
    If $h_dll == -1 Then
    MsgBox(16, "Error", 'Unable to open "' & $S_DLLPATH & '".')
    Exit (1)
    EndIf
    Local $ptr_cusbaccess = _ClewareInit($h_dll)

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

    GUISetState(@SW_SHOW, $h_maingui)
    While 1
    $a_msg = GUIGetMsg(1)
    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop 1
    Case $a_msg[0] == $h_readtempbt
    _ClewareGetTemp($h_dll, $ptr_cusbaccess)
    Case $a_msg[0] == $h_readversionbt
    MsgBox(64, "Cleware Version", _ClewareGetDLLVersion($h_dll))
    EndSelect
    WEnd
    Exit (0)
    EndFunc ;==>main

    [/autoit]

    Die Funktion _FCWGetTemperature@16 verlangt als Übergabeparameter ein double, das gibt die Funktion DLLCall aber gar nicht her. Daher die Frage, wie lässt sich das lösen?

  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 30. Mai 2007 um 07:53

    bernd670

    Geile Sache. Ok, dass mit den FCW-Funktionen hatte ich wohl überlesen. Aber wie bist Du denn darauf gekommen vor die Funktion einen "_" und danach "@" zu schreiben? Anfrage beim Hersteller, oder hab ich da auch was übersehen?

    Auf jeden Fall: Vielen Dank. Echt geile Sache... :rock:

  • Sachen versteckt ausführen lassen

    • teh_hahn
    • 29. Mai 2007 um 18:09

    Echt gute Frage, mir fällt nur der Weg über die Transparenz ein, da man - so glaube ich zumindest - nicht auf die controls zugreifen kann, wenn man das programm komplett versteckt ausführt. Oder halt so:

    Spoiler anzeigen
    [autoit]

    Local $s_mainwintitle = "Unbenannt - Editor"
    Local $s_savewintitle = "Speichern unter"

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

    Run("notepad.exe", "", @SW_SHOW)
    WinWait($s_mainwintitle, "")
    WinSetState($s_mainwintitle, "", @SW_HIDE)
    ControlSend($s_mainwintitle, "", 15, "Hallo! Dies ist Text in Notepad...", 1)
    Send("^s", 0)
    WinWait($s_savewintitle, "")
    WinSetState($s_savewintitle, "", @SW_HIDE)
    Send("Name_der_Datei.txt", 0)
    Send("!s!db", 0)

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

    Exit(0)

    [/autoit]

    Was aber so ziemlich aufs Gleiche hinauskommt...

  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 29. Mai 2007 um 11:29

    Ja, stimmt. soweit gefixt. Hab mal eben alles unrelevante raus genommen. Das Problem bleibt. Er gibt immer aus, dass die Funktion nicht vorhanden ist. Bei der user32.dll von Windows klappt der Zugrif aber zum Beispiel. Funktioniert das Ganze den bei Dir?

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon
    #include <Array.au3>
    #include <Constants.au3>
    #include <GUIConstants.au3>
    Opt("MustDeclareVars", 0)
    main()

    Func _ClewareGetTemp($s_dllpath)
    Local $h_dll, $dllret = -1

    $h_dll = DllOpen($s_dllpath)
    If $h_dll == -1 Then
    MsgBox(16, "Error", "Unable to open " & $s_dllpath)
    EndIf

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

    $dllret = DllCall($h_dll, "int", "OpenCleware")
    Select
    Case @error == 0
    MsgBox(16, "Notification", "Gefundene Geräte: " & $dllret[0])
    Case @error == 1
    MsgBox(16, "Error", "Unable to use " & $s_dllpath)
    Case @error == 2
    MsgBox(16, "Error", "Unknown return type.")
    Case @error == 3
    MsgBox(16, "Error", "Function not found in " & $s_dllpath)
    EndSelect

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

    DllClose($h_dll)
    EndFunc

    Func main()
    Local Const $S_APPTITLE = "USB Temperature"
    Local Const $S_APPVERSION = "1.0"
    Local Const $S_DLLPATH = @ScriptDir & "\USBaccess.dll"
    Local $h_maingui, $h_readtempbt, $a_msg = -1

    $h_maingui = GUICreate($S_APPTITLE & " v" & $S_APPVERSION, 640, 480, -1, -1, $WS_BORDER + $WS_SYSMENU + $WS_VISIBLE)
    $h_readtempbt = GUICtrlCreateButton("&Read Temperature", 10, 10, 120, 20)

    While 1
    $a_msg = GUIGetMsg(1)
    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop
    Case $a_msg[0] == $h_readtempbt
    _ClewareGetTemp($S_DLLPATH)
    EndSelect
    WEnd
    GUIDelete($h_maingui)
    Exit(0)
    EndFunc

    [/autoit]
  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 29. Mai 2007 um 10:47

    Mhh, ne. Egal was ich mache. Es kommt immer der Fehler, dass die Funktion nicht gefunden wurde...

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon
    #include <Array.au3>
    #include <Constants.au3>
    #include <GUIConstants.au3>
    Opt("MustDeclareVars", 0)
    main()

    Func _ClewareGetTemp($s_dllpath)
    Local $h_dll, $dllret

    $h_dll = DllOpen($s_dllpath)
    If $h_dll == -1 Then
    MsgBox(16, "Error", "Unable to open " & $s_dllpath)
    EndIf

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

    $dllret = DllCall($h_dll, "OpenCleware", "int")
    If Not @error Then
    MsgBox(0, "Debug", "Gefundene Geräte: " & $dllret[0])
    EndIf

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

    ;~ GetTemperature(int deviceNo, double *Temperature, int *timeID)
    $dllret = DllCall($h_dll, 'int', '58', 'int', 1)
    Select
    Case @error == 1
    MsgBox(16, "Error", "Unable to use " & $s_dllpath)
    Case @error == 2
    MsgBox(16, "Error", "Unknown return type.")
    Case @error == 3
    MsgBox(16, "Error", "Function not found in " & $s_dllpath)
    EndSelect
    If IsArray($dllret) Then
    MsgBox(0, "Debug", $dllret[0])
    EndIf
    DllClose($h_dll)
    EndFunc

    Func main()
    Local Const $S_APPTITLE = "USB Temperature"
    Local Const $S_APPVERSION = "1.0"
    Local Const $S_DLLPATH = @ScriptDir & "\USBaccess.dll"
    Local $a_harddisk, $i_maingui, $i_readtempbt, $a_msg

    $i_maingui = GUICreate($S_APPTITLE & " v" & $S_APPVERSION, 640, 480, -1, -1, $WS_BORDER + $WS_SYSMENU + $WS_VISIBLE)
    $i_readtempbt = GUICtrlCreateButton("&Read Temperature", 10, 10, 120, 20)

    While 1
    $a_msg = GUIGetMsg(1)
    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop
    Case $a_msg[0] == $i_readtempbt
    _ClewareGetTemp($S_DLLPATH)
    EndSelect
    WEnd
    GUIDelete($i_maingui)
    Exit(0)
    EndFunc

    [/autoit]
  • Progressbar nur bis zu bestimmten Punkt

    • teh_hahn
    • 29. Mai 2007 um 10:22

    Ja, da stand es doch schon (bei gtaspiders Post):

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    $f_readvalue = 25.8

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

    $h_maingui = GUICreate("FB 0.00A for GW", 320, 40, -1, -1)
    $h_progressbar = GUICtrlCreateProgress(10, 10, 300, 20, $PBS_SMOOTH )
    GUICtrlSetData($h_progressbar, $f_readvalue)

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

    GUISetState(@SW_SHOW, $h_maingui)

    While 1
    $a_msg = GUIGetMsg(1)

    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop 1
    EndSelect
    WEnd
    GUIDelete($h_maingui)
    Exit(0)

    [/autoit]
  • Progressbar nur bis zu bestimmten Punkt

    • teh_hahn
    • 29. Mai 2007 um 09:30

    Hi,

    irgendwie versteh ich nicht ganz was Du willst. 25,8% sollen 100% sein? Oder willst Du einfach nur 25,8% anzeigen lassen? Ich denke mal nicht, dass Du folgendes meinst:

    [autoit]

    #include <GUIConstants.au3>

    $h_maingui = GUICreate("FB 0.00A for GW", 320, 70, -1, -1)
    $h_progressbar = GUICtrlCreateProgress(10, 10, 300, 20, $PBS_SMOOTH )
    $h_fillbt = GUICtrlCreateButton("&Fill", 10, 40, 60, 20)
    GUISetState(@SW_SHOW, $h_maingui)

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

    $f_readvalue = 25.8

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

    While 1
    $a_msg = GUIGetMsg(1)

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

    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop 1
    Case $a_msg[0] == $h_fillbt
    GUICtrlSetData($h_progressbar, $f_readvalue)
    EndSelect
    WEnd
    GUIDelete($h_maingui)
    Exit(0)

    [/autoit]
  • Cleware USBaccess.dll in AutoIt nutzen

    • teh_hahn
    • 29. Mai 2007 um 08:43

    Hi,

    ich weiß, die Frage mit dem Zugriff auf DLL-Funktionen kam schon öfter auf, aber vielleicht hilft mir das hier mal zur Klärung...

    Ich will mit AutoIt die USBaccess.dll von Cleware (http://www.cleware.de/) nutzen, damit kann man z.B. die Temperatur von einem USB-Device von Cleware auslesen. Mit C/C++ klappt das Ganze auch einwandfrei, mit AutoIt komm ich da aber auf keinen Nenner. Die Funktionen sind alle in der API.pdf (im Anhang) beschrieben und ich möchte jetzt vorherst nur eine Rückgabe, ob die Funktion aufgerufen werden kann mit AutoIt. Dazu folgender Code:

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon
    #include <Array.au3>
    #include <Constants.au3>
    #include <GUIConstants.au3>
    Opt("MustDeclareVars", 0)
    main()

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

    Func _ClewareGetTemp($s_dllpath, $s_function, $s_returnval)
    Local $h_dll

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

    $h_dll = DllOpen($s_dllpath)
    If $h_dll == -1 Then
    MsgBox(16, "Error", "Unable to open " & $s_dllpath)
    EndIf

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

    DllCall($h_dll, $s_returnval, $s_function)
    Select
    Case @error == 1
    MsgBox(16, "Error", "Unable to use " & $s_dllpath)
    Case @error == 2
    MsgBox(16, "Error", "Unknown return type of " & $s_function)
    Case @error == 3
    MsgBox(16, "Error", "Function " & $s_function & " not found in " & $s_dllpath)
    EndSelect

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

    DllClose($h_dll)
    EndFunc

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

    Func main()
    Local Const $S_APPTITLE = "USB Temperature"
    Local Const $S_APPVERSION = "1.0"
    Local Const $S_DLLPATH = "USBaccess.dll"
    Local $a_harddisk, $i_maingui, $i_readtempbt, $a_msg

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

    $i_maingui = GUICreate($S_APPTITLE & " v" & $S_APPVERSION, 640, 480, -1, -1, $WS_BORDER + $WS_SYSMENU + $WS_VISIBLE)
    $i_readtempbt = GUICtrlCreateButton("&Read Temperature", 10, 10, 120, 20)

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

    While 1
    $a_msg = GUIGetMsg(1)
    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop
    Case $a_msg[0] == $i_readtempbt
    _ClewareGetTemp($S_DLLPATH, "CUSBaccess CWusb", "none")
    EndSelect
    WEnd
    GUIDelete($i_maingui)
    Exit(0)
    EndFunc

    [/autoit]

    Normalerweise müsste ich doch jetzt was anderes zurückbekommen als @error... Habs auch mit anderen Funktionen getestet. Liegt es daran, dass die DLL extra für so eine Nutzung gebaut werden muss (bin ned so der experte im umgang mit dlls...) eigentlich müsste eine Nutzung der Funktionen doch möglich sein, wenn sie als public deklariert sind...

    Achso, was ich noch gesehen hab ist, dass sie Beispiele in VB dabei haben... Das wäre ansonsten natürlich eine Alternative diese in AutoIt zu übersetzen, allerdings nutzen sie dafür ActiveX-Steuerelemente... (Wie nutzt man denn die?)

    Naja, bin mal gespannt auf Antworten. :D

    bernd670: Spoiler gesetzt!

    Dateien

    Cleware.zip 131,1 kB – 296 Downloads
  • GUI tabs

    • teh_hahn
    • 29. Mai 2007 um 08:30

    Jupp, Hilfe sollte Dir bei solchen Fragen eigentlich immer helfen können. Nur zur Erklärung:
    Du musst erst das Tab-control an sich erstellen, dann den Reiter und danach die controls, die du in diesem Reiter hast. Am Ende schließt du die Tab-Definitionen mit einem leeren Reiter:

    Beispiel:

    [autoit]

    #include <GUIConstants.au3>

    $h_maingui =GUICreate("FB 0.00A for GW", 600, 500, -1, -1)
    GUICtrlCreateTab(10, 10, 580, 480)
    GUICtrlCreateTabitem("ReadMe")
    $h_okbt = GUICtrlCreateButton("&Start", 500, 450, 60, -1)
    GUICtrlCreateTabitem("")

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

    GUISetState(@SW_SHOW, $h_maingui)

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

    While 1
    $a_msg = GUIGetMsg(1)

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

    Select
    Case $a_msg[0] == $GUI_EVENT_CLOSE
    ExitLoop 1
    Case $a_msg[0] == $h_okbt
    MsgBox(64, "Test", "You clicked on Start!")
    EndSelect
    WEnd
    GUIDelete($h_maingui)
    Exit(0)

    [/autoit]

    Zu Deiner Frage mit dem include: Ein include ist - einfach gesagt - einfach nur eine Anweisung für den Compiler, die angegebene Datei "mitzunehmen". Es ist also nichts weiter als eine textuelle Ersetzung. Du könntest genausogut den Inhalt der GUIConstants.au3 in Dein Skript kopieren - macht aber keinen Sinn.

  • Kontextmenü von AutoIt

    • teh_hahn
    • 29. Mai 2007 um 08:13
    Zitat

    Original von th.meger
    das wurde entfernt.

    Hab ich was verpasst? Wurde ersetzt durch "Compile using AutoIt3Wrapper"

    Falls du den Eintrag nicht hast setze folgende Registryschlüssel:

    Code
    "HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Compile using AutoIt3Wrapper"
    "HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Compile using AutoIt3Wrapper\Command"

    In letzterem setzt du den Defaulteintrag vom Typ REG_SZ auf:

    Code
    "C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /in "%l"


    Oder halt dem Verzeichnis, wo deine AutoIt3Wrapper.exe liegt.

  • Information aus dokument extrahieren

    • teh_hahn
    • 25. Mai 2007 um 14:05

    @CallMeN00b68
    Hilfe richtig lesen:

    [autoit]

    FileRead

    [/autoit]

    :

    Code
    Return Value
    
    
    Success: Returns the binary/string read. 
    Special: Sets @error to -1 if end-of-file is reached. 
    Failure: Sets @error to 1 if file not opened in read mode or other error. 
    Sets @error to 2 if count not defined for file open in raw read mode.

    Und wenn deine Datei Carriage Returns und Linefeeds enthält, dann liest er das natürlich mit ein... Kommt halt ganz auf das an, was du vorhast...

  • Problem bei der Überprüfung ob File passend mit Datum vorhanden

    • teh_hahn
    • 25. Mai 2007 um 09:03

    Alter, Falter...

    Hab Dein Skript mal ein "wenig" verkleinert. (Wenn ich nicht total blind war, dann wird achtmal das Gleiche gemacht (nur mit anderer Dateiendung und Debugmeldung).

    Hab mir das Skript nicht näher angeschaut, aber Du kannst Dir da noch vieles vieles einfacher machen. Du prüfst z.B. zum Ende hin nochmal auf Dateien, auf die Du zu Anfang geprüft hast (Wo sollen die denn hin sein? Dein Skript löscht doch nichts.)

    Lass Dir mal den ausgelesenen Timestamp aus der INI und den von Dir erzeugten Timestamp in ner MSGBox ausgeben und überprüfe deine Abfragen vor Fehlermeldungen, dann wird das was. :D

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon
    #include <Date.au3>
    #include <File.au3>

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

    Opt("MustDeclareVars", 1)
    Opt("RunErrorsFatal", 0)

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

    Func CheckFile($s_filename, $i_mode = 2)
    Local $h_file = -1

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

    $h_file = FileOpen($s_filename, $i_mode)
    If $h_file == -1 Then
    MsgBox(16, "Error", "Unable to open file.")
    Exit (1)
    EndIf

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

    Return ($h_file)
    EndFunc ;==>CheckFile

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

    Func FailMailExists($s_filename, $s_mandant)
    Local $h_file = -1

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

    $h_file = CheckFile($s_filename, 2)
    FileWrite($h_file, "To: [email='Helpdesk@verkehrsbuero.at'][/email]" & @CRLF)
    FileWrite($h_file, "Subject: " & @MDAY & "." & @MON & "." & @YEAR & " ACHTUNG !! Der Jack (Mandant: " & $s_mandant & ") hat Datenüberleitungs Probleme!" & @CRLF & @CRLF)
    FileWrite($h_file, "Diese Files sind auf dem CRS nicht vorhanden :" & @CRLF & @CRLF)

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

    Return ($h_file)
    EndFunc ;==>FailMailExists

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

    Local Const $S_CONFIGFILE = @ScriptDir & "\Export.ini"
    Local Const $S_EMPTYVAL = "Keine Pfad konfiguriert"
    Local Const $S_OKFILE = @ScriptDir & "\OK_MAIL.txt"
    Local Const $S_FAILFILE = @ScriptDir & "\Fail_MAIL.txt"
    Local Const $S_OKSMSFILE = @ScriptDir & "\OK_SMS.TXT"
    Local Const $S_FAILSMSFILE = @ScriptDir & "\Fail_SMS.TXT"
    Local Const $s_smsrecipient = "*"
    Local Const $A_FILEEXT[8] = ["*.A", "*.J", "\*.K", "\*.B", "\*.S", "\*.U", "*.V", "\*.M"]

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

    Local $s_mandant = IniRead($S_CONFIGFILE, "MANDANT", "MAN", $S_EMPTYVAL)
    Local $A_DESCRIPTION[8] = ["A" & $s_mandant & " File (Mitarbeiter Export)", "J" & $s_mandant & " File (Journal Export)", _
    "K" & $s_mandant & " File (Kunden Export)", "B" & $s_mandant & " File (SAP Export)", _
    "S" & $s_mandant & " File (SAP Export)", "U" & $s_mandant & " File (SAP Export)", _
    "V" & $s_mandant & " File (Buchungs Gesamt Preis Liste Export)", "M" & $s_mandant & " File (MIS Export)"]

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

    Local $s_crspath = IniRead($S_CONFIGFILE, "PFADE", "CRS", $S_EMPTYVAL)
    Local $s_crsmpath = IniRead($S_CONFIGFILE, "PFADE", "CRSM", $S_EMPTYVAL)
    Local $s_crswpath = IniRead($S_CONFIGFILE, "PFADE", "CRSW", $S_EMPTYVAL)
    Local $s_rootpath = IniRead($S_CONFIGFILE, "PFADE", "root", $S_EMPTYVAL)
    Local $s_timeend = IniRead($s_rootpath & "\log\time.stamp", "TIME", "ende", "NotFound")
    Local $s_mailsender = IniRead($S_CONFIGFILE, "MAIL", "FROM", "Jack@verkehr*.lan")
    Local $s_mailserver = IniRead($S_CONFIGFILE, "MAIL", "SRV", "172.30.241.40")

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

    Local $s_currentfile, $s_filetime = ""
    Local $a_filetime, $h_file = -1

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

    For $i = 0 To $A_FILEEXT[0] Step 1
    $s_currentfile = $s_crswpath & "\" & $A_FILEEXT[$i] & $s_mandant

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

    If FileExists($s_currentfile) == 1 Then
    $a_filetime = FileGetTime($s_currentfile, 1, 0)
    If _DateTimeFormat(_DateAdd('d', -1, $a_filetime[0] & "/" & $a_filetime[1] & "/" & $a_filetime[2]), 2) = $s_timeend Then
    If FileExists($S_OKFILE) == 1 Then
    $h_file = CheckFile($S_OKFILE, 1)
    FileWriteLine($h_file, "To: [email='Helpdesk@verkehrsbuero.at'][/email]" & @CRLF)
    FileWriteLine($h_file, "Subject: " & @MDAY & "." & @MON & "." & @YEAR & " Der Jack (Mandant: " & $s_mandant & ") hat die Daten auf den CRS übergeleitet!" & @CRLF & @CRLF)
    FileWriteLine($h_file, "Die Files sind auf dem CRS vorhanden:" & @CRLF & @CRLF)
    Else
    $h_file = CheckFile($S_OKFILE, 2)
    EndIf
    FileWriteLine($h_file, "Das " & $A_DESCRIPTION[$i] & " ist vorhanden" & @CRLF & @CRLF)
    FileClose($h_file)
    Else
    If FileExists($S_FAILFILE) == 1 Then
    $h_file = FailMailExists($S_FAILFILE, $s_mandant)
    Else
    $h_file = CheckFile($S_FAILFILE, 2)
    EndIf
    FileWriteLine($h_file, "Das " & $A_DESCRIPTION[$i] & " ist mit falschen Datum vorhanden" & @CRLF)
    FileWriteLine($h_file, "Bitte die Überleitung auf der CTWS04 Überprüfen" & @CRLF)
    FileClose($h_file)
    EndIf
    Else
    If FileExists($S_FAILFILE) == 1 Then
    $h_file = CheckFile($S_FAILFILE, 1)
    Else
    $h_file = FailMailExists($S_FAILFILE, $s_mandant)
    EndIf
    FileWriteLine($h_file, "Das " & $A_DESCRIPTION[$i] & " ist nicht vorhanden" & @CRLF)
    FileClose($h_file)
    EndIf
    Next

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

    If FileExists($S_FAILFILE) == 1 Then
    $h_file = CheckFile($S_FAILSMSFILE, 1)
    FileWrite($h_file, " Der Jack-Mandant: " & $s_mandant & " hat Datenueberleitungsprobleme! Bitte um Kontrolle!")
    FileClose($h_file)
    RunWait(@ScriptDir & "\VMAILER.EXE " & $S_FAILSMSFILE & " " & $s_mailserver & " " & $s_smsrecipient & " " & $s_mailsender)
    FileDelete($S_FAILSMSFILE)
    Else
    $h_file = CheckFile($S_OKSMSFILE, 1)
    FileWrite($h_file, " Der Jack-Mandant: " & $s_mandant & " hat alle Daten uebergeleitet")
    FileClose($h_file)
    RunWait(@ScriptDir & "\VMAILER.EXE " & $S_OKSMSFILE & " " & $s_mailserver & " [email='06646258027@SMSGATEWAY.verkehrsbuero.lan'][/email] " & $s_mailsender)
    FileDelete($S_OKSMSFILE)
    EndIf

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

    If FileExists($S_FAILSMSFILE) Then
    RunWait(@ScriptDir & "\VMAILER.EXE " & $S_FAILFILE & " " & $s_mailserver & " " & $s_smsrecipient & " " & $s_mailsender)
    Else
    RunWait(@ScriptDir & "\VMAILER.EXE " & $S_OKFILE & " " & $s_mailserver & " " & $s_smsrecipient & " " & $s_mailsender)
    EndIf

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

    If FileExists($S_OKFILE) == 1 Then
    FileDelete($S_OKFILE)
    EndIf

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

    If FileExists($S_FAILFILE) == 1 Then
    FileDelete($S_FAILFILE)
    EndIf

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

    Run(@ScriptDir & '\Speicher_Warnung.exe', @ScriptDir)

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

    Exit (0)

    [/autoit]

    Edit BugFix: Spoiler eingefügt

  • Frage: konvertieren von 3gp - Dateien

    • teh_hahn
    • 23. Mai 2007 um 08:55

    Ich würde Dir ffmpeg empfehlen: http://ffmpeg.mplayerhq.hu/.
    Ist unter Linux quasi der Standard schlechthin (im verbund mit transcode). ffmpeg gibt es auch bereits compiliert als Windows binary unter: http://ffdshow.faireal.net/mirror/ffmpeg/.

    Das Projekt wird laufend aktualisiert und ca. halbmonatlich kommt ein neuer Release raus. Wenn du dir die Projectseite (erster Link) anschaust findest Du auch die entsprechende Dokumentation dazu.

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™