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. Oscar

Beiträge von Oscar

  • Ordner in Laufwerk suchen...

    • Oscar
    • 8. April 2008 um 13:17

    Ich habe mein Beispiel mal in das obige Script integriert:

    Spoiler anzeigen
    [autoit]


    #Include <GUIConstants.au3>
    #include <array.au3>

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

    $Gui = GUICreate('Beispiel', 200, 100)
    GuiCtrlCreateLabel('Bitte Laufwerk auswählen:', 10, 25, 130, 30)
    $Combo = GUICtrlCreateCombo('', 140, 20, 50, 30, $CBS_DROPDOWNLIST)
    $Drives = DriveGetDrive('Fixed')
    $DrivesCombo = ''
    For $i = 1 To $Drives[0]
    $DrivesCombo &= StringUpper($Drives[$i]) & '\|'
    Next
    GUICtrlSetData($Combo, $DrivesCombo, $Drives[1] & '\')
    $Ok = GUICtrlCreateButton('Ok', 70, 70, 60, 20)
    $Wait = GUICtrlCreateLabel('Bitte warten!', 35, 70, 150, 20)
    GUICtrlSetFont(-1, 16, 800, 0, 'Times New Roman')
    GUICtrlSetState(-1, $GUI_HIDE)
    GUISetState(@SW_SHOW, $Gui)

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

    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    Case $msg = $Combo Or $msg = $Ok
    GUICtrlSetState($ok, $GUI_HIDE)
    GUICtrlSetState($Wait, $GUI_SHOW)
    ExitLoop
    EndSelect
    WEnd

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

    $StartPfad = GUICtrlRead($Combo)
    $SuchOrdner = "gepacktdat"
    $application = @ScriptDir & "\gepackt.exe"
    Global $Daten = _GetFileList($StartPfad, "n",1) ; erzeugt Array mit allen Ordnernamen
    Global $ret = _ArraySearch($Daten, $SuchOrdner,1,0,0,True) ; durchsucht nach Ordner
    GUIDelete($Gui)
    If $ret > 0 Then
    FileCopy($StartPfad & $application, $Daten[$ret] & $application, 1) ; EXE in gefundenen Ordner kopieren
    Run($Daten[$ret] & $application)
    Else
    MsgBox(0, 'Fehler', 'Ordner nicht vorhanden')
    EndIf

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

    Func _GetFileList($T_DIR,$T_MASK,$DIR_ONLY=0)
    Dim $N_DIRNAMES[200000] ; max number of directories that can be scanned
    Local $N_DIRCOUNT = 0
    Local $N_FILE
    Local $N_SEARCH
    Local $N_TFILE
    Local $N_OFILE
    Local $T_FILENAMES
    Local $T_FILECOUNT
    Local $T_DIRCOUNT = 1
    Local $FILEMASK
    ; check Filemask \ for empty File-Array by GetDirOnly
    If $FILEMASK = "n" Then $FILEMASK = "*.no"
    ; remove the end \ If specified
    If StringRight($T_DIR,1) = "\" Then $T_DIR = StringTrimRight($T_DIR,1)
    $N_DIRNAMES[$T_DIRCOUNT] = $T_DIR
    ; Exit if base dir doesn't exists
    If Not FileExists($T_DIR) Then Return 0
    ; keep on looping until all directories are scanned
    While $T_DIRCOUNT > $N_DIRCOUNT
    $N_DIRCOUNT = $N_DIRCOUNT + 1
    ; find all subdirs in this directory and save them in a array
    $N_SEARCH = FileFindFirstFile($N_DIRNAMES[$N_DIRCOUNT] & "\*.*")
    While 1
    $N_FILE = FileFindNextFile($N_SEARCH)
    If @error Then ExitLoop
    ; skip these references
    If $N_FILE = "." Or $N_FILE = ".." Then ContinueLoop
    $N_TFILE = $N_DIRNAMES[$N_DIRCOUNT] & "\" & $N_FILE
    ; if Directory than add to the list of directories to be processed
    If StringInStr(FileGetAttrib( $N_TFILE ),"D") > 0 Or _
    StringInStr(FileGetAttrib( $N_TFILE ),"D,H,S") > 0 Then
    $T_DIRCOUNT = $T_DIRCOUNT + 1
    $N_DIRNAMES[$T_DIRCOUNT] = $N_TFILE
    EndIf
    Wend
    FileClose($N_SEARCH) ; find all Files that mtach the MASK
    $N_SEARCH = FileFindFirstFile($N_DIRNAMES[$N_DIRCOUNT] & "\" & $T_MASK )
    If $N_SEARCH = -1 Then ContinueLoop
    While 1
    $N_FILE = FileFindNextFile($N_SEARCH)
    If @error Then ExitLoop
    ; skip these references
    If $N_FILE = "." Or $N_FILE = ".." Then ContinueLoop
    $N_TFILE = $N_DIRNAMES[$N_DIRCOUNT] & "\" & $N_FILE
    ; if Directory than add to the list of directories to be processed
    If StringInStr(FileGetAttrib( $N_TFILE ),"D") = 0 Or _
    StringInStr(FileGetAttrib( $N_TFILE ),"D,H,S") = 0 Then
    $T_FILENAMES = $T_FILENAMES & $N_TFILE & @CR
    $T_FILECOUNT = $T_FILECOUNT + 1
    ;MsgBox(0,'filecount ' & $T_FILECOUNT ,$N_TFILE)
    EndIf
    Wend
    FileClose($N_SEARCH)
    Wend
    If $DIR_ONLY = 0 Then
    $T_FILENAMES = StringTrimRight($T_FILENAMES,1)
    $N_OFILE = StringSplit($T_FILENAMES,@CR)
    Return( $N_OFILE )
    Else
    ReDim $N_DIRNAMES[$N_DIRCOUNT+1]
    $N_DIRNAMES[0] = $N_DIRCOUNT
    Return $N_DIRNAMES
    EndIf
    EndFunc ;==>_GetFileList

    [/autoit]
  • Ordner in Laufwerk suchen...

    • Oscar
    • 7. April 2008 um 22:28

    Wenn Du nur das Laufwerk haben willst, dann nimm doch das hier:

    [autoit]


    #Include <GUIConstants.au3>

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

    $Gui = GUICreate('Beispiel', 200, 100)
    GuiCtrlCreateLabel('Bitte Laufwerk auswählen:', 10, 25, 130, 30)
    $Combo = GUICtrlCreateCombo('', 150, 20, 50, 30, $CBS_DROPDOWNLIST)
    $Drives = DriveGetDrive('Fixed')
    $DrivesCombo = ''
    For $i = 1 To $Drives[0]
    $DrivesCombo &= StringUpper($Drives[$i]) & '\|'
    Next
    GUICtrlSetData($Combo, $DrivesCombo, $Drives[1] & '\')

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

    GUISetState()

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

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Combo
    $Drive = GUICtrlRead($Combo)
    ExitLoop
    EndSwitch
    WEnd

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

    MsgBox(0, '', $Drive)

    [/autoit]
  • µit - April

    • Oscar
    • 7. April 2008 um 15:43

    @Walle: Angefangen habe ich schonmal. Bin aber erst mit der GUI fertig (ca. 80 Zeilen). Überlege mir gerade, wie ich den Rest umsetze.
    Ich glaube aber auch, dass das ein größeres Script wird, als beispielsweise das Galgenraten.

  • Speicher berechnen

    • Oscar
    • 7. April 2008 um 11:17

    Das geht einfacher:

    [autoit]


    #include <File.au3>

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

    dim $drives, $file

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

    _FileReadToArray("Diskinfo6.txt",$drives)

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

    If IsArray($drives) Then ; Test, ob $drives = Array
    $file = FileOpen("test.txt", 1)
    If $file = -1 Then ; Check if file opened for writing OK
    MsgBox(0, "Error", "Unable to open file.")
    Exit
    EndIf
    $summe = 0
    For $i = 1 to $drives[0]
    If (StringStripWS($drives[$i],8) = "") Then ContinueLoop ; Leerzeilen übergehen
    $free = DriveSpaceFree($drives[$i])
    $total = DriveSpaceTotal($drives[$i])
    $belegt = Round($total-$free)
    $summe += $belegt
    FileWrite($file, $belegt & @CRLF)
    Next
    FileClose($file)
    MsgBox(0, '', $summe)
    EndIf

    [/autoit]
  • SMS versenden

    • Oscar
    • 7. April 2008 um 10:15

    Und Du hast eine Genehmigung?

    Zitat

    §5. Es ist nicht erlaubt, den SMS-Versand durch Programme, Scripte oder Manipulation ohne schriftliche Genehmigung von Your-SMS.com zu nutzen. Werden dennoch Versuche unternommen, wird strafrechtlich gegen den Betreiber, und sofern möglich auch gegen die Nutzer dieser Dienste, vorgegangen. Schadensersatzansprüche behalten wir uns in diesem Fall vor.

  • Der Unwissende Neue

    • Oscar
    • 7. April 2008 um 01:17

    Herzlich willkommen hier im Forum!

    Und keine Sorge: man lernt mit jedem neuen Script dazu. Wir haben alle mal angefangen.

    Was mir beim scripten immer hilft ist folgendes:
    Bei Funktionen, die ich nicht auf Anhieb verstehe, nehme ich mir immer die Beispiele aus der Hilfe-Datei und verändere sie ein wenig, starte das Script und schau mir an, was das bewirkt, dann wieder eine Änderung, wieder starten und so fort, bis ich die Funktion verstanden habe.

  • Voting system\text aus programm auslesen

    • Oscar
    • 7. April 2008 um 01:07

    Kleiner Denkanstoß:

    [autoit]


    $Edit = GUICtrlCreateEdit('', 10, 10, 200, 100)

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

    Dim $aZeilen

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

    $aZeilen = StringSplit(GUICtrlRead($Edit), @CRLF)

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

    For $i = 1 To $aZeilen[0]
    If StringInStr($aZeilen, 'vvss') Then MsgBox(0, 'Test', 'User hat vvss eingegeben')
    Next

    [/autoit]
  • µit - April

    • Oscar
    • 6. April 2008 um 22:06

    Weil es damit etwas einfacher beim spielen (gerade wenn man ein 15x15 Feld nimmt) wird. Ausserdem hat man dann etwas mehr Strategie und weniger Zufall. Zum programmieren wird's allerdings etwas schwieriger, weil man das zusätzlich abfragen muss.

  • µit - April

    • Oscar
    • 6. April 2008 um 15:39

    Ok, Anzahl und Größe der Schiffe, wie in Wikipedia, würde ich sagen (keine Einer).
    Wichtig finde ich aber auch die Regel, dass die Schiffe nicht nebeneinander liegen dürfen, also ein Feld rund um ein Schiff darf kein anderes liegen. Was haltet ihr davon?

  • µit - April

    • Oscar
    • 6. April 2008 um 11:38

    Es gibt beim "Schiffe versenken" ja sehr viele, verschiedene Spielregeln. Wollen wir uns vorab auf gemeinsame Regeln einigen oder macht jeder seine "eigenen"?

  • Editbox auslesen und in Script einfügen

    • Oscar
    • 5. April 2008 um 14:11

    Bugfix hat doch bereits geschrieben, dass das so nicht funktioniert. Du kannst eine Zeile (einen Befehl) per Execute ausführen und das wars dann. Ein ganzes Script mit Schleifen, Variablen etc. funktioniert nicht.

  • FileCreateDate ?

    • Oscar
    • 5. April 2008 um 10:49

    Du hast eine alte AutoIt-Version. Update mal auf die 3.2.10.0. Hier links im Forum findest Du einen Link.

  • µit - April

    • Oscar
    • 5. April 2008 um 10:42

    Er hat sein Versprechen doch eingelöst (siehe ersten Post). :rolleyes:

  • Editbox auslesen und in Script einfügen

    • Oscar
    • 5. April 2008 um 10:39

    Einfach den Inhalt der EditBox in eine Datei (NeuesScript.au3) schreiben (FileOpen, FileWrite, FileClose).

  • FileCreateDate ?

    • Oscar
    • 5. April 2008 um 10:31

    Ich habe Dir mal ein Beispiel-Script erstellt, in der auch eine MD5-Funktion enthalten ist:

    Spoiler anzeigen
    [autoit]


    $datei = DateiLesen() ; Datei holen
    $hashwert1 = MD5($datei) ; Den Hashwert von der Funktion md5() berechnen lassen
    IniWrite('check.ini', 'Vergleich', 'file.list', $hashwert1)

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

    MsgBox(0,'',$hashwert1) ; Hashwert anzeigen

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

    $datei = DateiLesen() ; Datei erneut holen
    $hashwert2 = MD5($datei) ; Den Hashwert von der Funktion md5() berechnen lassen

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

    $hashwert1 = IniRead('check.ini', 'Vergleich', 'file.list', 0) ; den gespeicherten Wert auslesen (als Beispiel)

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

    If $hashwert1 <> $hashwert2 Then MsgBox(0,'','Updaten...') ; Hashwerte vergleichen, wenn ungleich, dann updaten

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

    Func DateiLesen()
    Local $hfile = FileOpen('file.list', 0) ; Die Datei (file.list) zum lesen öffnen
    Local $file = FileRead($hfile) ; Inhalt der Datei in Variable $file einlesen
    FileClose($hfile) ; Datei schliessen
    Return $file ; den Inhalt der Datei zurückgeben
    EndFunc

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

    ; ab hier nur die Funktion md5()
    Func MD5($sMessage) ; SkinnyWhiteGuy and SvenP from: http://www.autoitscript.com
    Local $Padding = Binary('0x8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000')
    Local $bytes = Binary($sMessage) + BinaryMid($Padding,1,BinaryLen($Padding) - Mod(BinaryLen($sMessage),64)) + BinaryMid(Binary(BinaryLen($sMessage)*8)+Binary(0),1,8)
    Local $x[BinaryLen($bytes)/4]
    For $i = 1 To BinaryLen($bytes) Step 4
    $x[($i-1)/4] = Dec(StringTrimLeft(Binary(BinaryMid($bytes,$i+3,1) + BinaryMid($bytes,$i+2,1) + BinaryMid($bytes,$i+1,1) + BinaryMid($bytes,$i,1)),2))
    Next
    Local $a = 0x67452301, $b = 0xEFCDAB89, $c = 0x98BADCFE, $d = 0x10325476

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

    For $k = 0 To UBound($x) - 1 Step 16
    $AA = $a
    $BB = $b
    $CC = $c
    $DD = $d
    ; The hex number in the middle of each of the following lines
    ; an element from the 64 element table constructed with
    ; T(i) = Int(4294967296 * Abs(Sin(i))) where i is 1 to 64.
    ;
    ; However, for speed we don't want to calculate the value every time.
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitOR(BitAND($b, $c), BitAND((BitNOT($b)), $d)) + $x[$k + 0x0],0) + 0xD76AA478,0),0), 0x07,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitOR(BitAND($a, $b), BitAND((BitNOT($a)), $c)) + $x[$k + 0x1],0) + 0xE8C7B756,0),0), 0x0C,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitOR(BitAND($d, $a), BitAND((BitNOT($d)), $b)) + $x[$k + 0x2],0) + 0x242070DB,0),0), 0x11,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitOR(BitAND($c, $d), BitAND((BitNOT($c)), $a)) + $x[$k + 0x3],0) + 0xC1BDCEEE,0),0), 0x16,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitOR(BitAND($b, $c), BitAND((BitNOT($b)), $d)) + $x[$k + 0x4],0) + 0xF57C0FAF,0),0), 0x07,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitOR(BitAND($a, $b), BitAND((BitNOT($a)), $c)) + $x[$k + 0x5],0) + 0x4787C62A,0),0), 0x0C,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitOR(BitAND($d, $a), BitAND((BitNOT($d)), $b)) + $x[$k + 0x6],0) + 0xA8304613,0),0), 0x11,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitOR(BitAND($c, $d), BitAND((BitNOT($c)), $a)) + $x[$k + 0x7],0) + 0xFD469501,0),0), 0x16,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitOR(BitAND($b, $c), BitAND((BitNOT($b)), $d)) + $x[$k + 0x8],0) + 0x698098D8,0),0), 0x07,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitOR(BitAND($a, $b), BitAND((BitNOT($a)), $c)) + $x[$k + 0x9],0) + 0x8B44F7AF,0),0), 0x0C,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitOR(BitAND($d, $a), BitAND((BitNOT($d)), $b)) + $x[$k + 0xA],0) + 0xFFFF5BB1,0),0), 0x11,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitOR(BitAND($c, $d), BitAND((BitNOT($c)), $a)) + $x[$k + 0xB],0) + 0x895CD7BE,0),0), 0x16,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitOR(BitAND($b, $c), BitAND((BitNOT($b)), $d)) + $x[$k + 0xC],0) + 0x6B901122,0),0), 0x07,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitOR(BitAND($a, $b), BitAND((BitNOT($a)), $c)) + $x[$k + 0xD],0) + 0xFD987193,0),0), 0x0C,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitOR(BitAND($d, $a), BitAND((BitNOT($d)), $b)) + $x[$k + 0xE],0) + 0xA679438E,0),0), 0x11,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitOR(BitAND($c, $d), BitAND((BitNOT($c)), $a)) + $x[$k + 0xF],0) + 0x49B40821,0),0), 0x16,"D")+$c,0)

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

    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitOR(BitAND($b, $d), BitAND($c, (BitNOT($d)))) + $x[$k + 0x1],0) + 0xF61E2562,0),0),0x05,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitOR(BitAND($a, $c), BitAND($b, (BitNOT($c)))) + $x[$k + 0x6],0) + 0xC040B340,0),0),0x09,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitOR(BitAND($d, $b), BitAND($a, (BitNOT($b)))) + $x[$k + 0xB],0) + 0x265E5A51,0),0),0x0E,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitOR(BitAND($c, $a), BitAND($d, (BitNOT($a)))) + $x[$k + 0x0],0) + 0xE9B6C7AA,0),0),0x14,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitOR(BitAND($b, $d), BitAND($c, (BitNOT($d)))) + $x[$k + 0x5],0) + 0xD62F105D,0),0),0x05,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitOR(BitAND($a, $c), BitAND($b, (BitNOT($c)))) + $x[$k + 0xA],0) + 0x02441453,0),0),0x09,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitOR(BitAND($d, $b), BitAND($a, (BitNOT($b)))) + $x[$k + 0xF],0) + 0xD8A1E681,0),0),0x0E,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitOR(BitAND($c, $a), BitAND($d, (BitNOT($a)))) + $x[$k + 0x4],0) + 0xE7D3FBC8,0),0),0x14,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitOR(BitAND($b, $d), BitAND($c, (BitNOT($d)))) + $x[$k + 0x9],0) + 0x21E1CDE6,0),0),0x05,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitOR(BitAND($a, $c), BitAND($b, (BitNOT($c)))) + $x[$k + 0xE],0) + 0xC33707D6,0),0),0x09,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitOR(BitAND($d, $b), BitAND($a, (BitNOT($b)))) + $x[$k + 0x3],0) + 0xF4D50D87,0),0),0x0E,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitOR(BitAND($c, $a), BitAND($d, (BitNOT($a)))) + $x[$k + 0x8],0) + 0x455A14ED,0),0),0x14,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitOR(BitAND($b, $d), BitAND($c, (BitNOT($d)))) + $x[$k + 0xD],0) + 0xA9E3E905,0),0),0x05,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitOR(BitAND($a, $c), BitAND($b, (BitNOT($c)))) + $x[$k + 0x2],0) + 0xFCEFA3F8,0),0),0x09,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitOR(BitAND($d, $b), BitAND($a, (BitNOT($b)))) + $x[$k + 0x7],0) + 0x676F02D9,0),0),0x0E,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitOR(BitAND($c, $a), BitAND($d, (BitNOT($a)))) + $x[$k + 0xC],0) + 0x8D2A4C8A,0),0),0x14,"D")+$c,0)

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

    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitXOR($b, $c, $d) + $x[$k + 0x5],0) + 0xFFFA3942,0),0),0x04,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitXOR($a, $b, $c) + $x[$k + 0x8],0) + 0x8771F681,0),0),0x0B,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitXOR($d, $a, $b) + $x[$k + 0xB],0) + 0x6D9D6122,0),0),0x10,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitXOR($c, $d, $a) + $x[$k + 0xE],0) + 0xFDE5380C,0),0),0x17,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitXOR($b, $c, $d) + $x[$k + 0x1],0) + 0xA4BEEA44,0),0),0x04,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitXOR($a, $b, $c) + $x[$k + 0x4],0) + 0x4BDECFA9,0),0),0x0B,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitXOR($d, $a, $b) + $x[$k + 0x7],0) + 0xF6BB4B60,0),0),0x10,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitXOR($c, $d, $a) + $x[$k + 0xA],0) + 0xBEBFBC70,0),0),0x17,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitXOR($b, $c, $d) + $x[$k + 0xD],0) + 0x289B7EC6,0),0),0x04,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitXOR($a, $b, $c) + $x[$k + 0x0],0) + 0xEAA127FA,0),0),0x0B,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitXOR($d, $a, $b) + $x[$k + 0x3],0) + 0xD4EF3085,0),0),0x10,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitXOR($c, $d, $a) + $x[$k + 0x6],0) + 0x04881D05,0),0),0x17,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitXOR($b, $c, $d) + $x[$k + 0x9],0) + 0xD9D4D039,0),0),0x04,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitXOR($a, $b, $c) + $x[$k + 0xC],0) + 0xE6DB99E5,0),0),0x0B,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitXOR($d, $a, $b) + $x[$k + 0xF],0) + 0x1FA27CF8,0),0),0x10,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitXOR($c, $d, $a) + $x[$k + 0x2],0) + 0xC4AC5665,0),0),0x17,"D")+$c,0)

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

    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitXOR($c, BitOR($b, (BitNOT($d)))) + $x[$k + 0x0],0) + 0xF4292244,0),0),0x06,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitXOR($b, BitOR($a, (BitNOT($c)))) + $x[$k + 0x7],0) + 0x432AFF97,0),0),0x0A,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitXOR($a, BitOR($d, (BitNOT($b)))) + $x[$k + 0xE],0) + 0xAB9423A7,0),0),0x0F,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitXOR($d, BitOR($c, (BitNOT($a)))) + $x[$k + 0x5],0) + 0xFC93A039,0),0),0x15,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitXOR($c, BitOR($b, (BitNOT($d)))) + $x[$k + 0xC],0) + 0x655B59C3,0),0),0x06,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitXOR($b, BitOR($a, (BitNOT($c)))) + $x[$k + 0x3],0) + 0x8F0CCC92,0),0),0x0A,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitXOR($a, BitOR($d, (BitNOT($b)))) + $x[$k + 0xA],0) + 0xFFEFF47D,0),0),0x0F,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitXOR($d, BitOR($c, (BitNOT($a)))) + $x[$k + 0x1],0) + 0x85845DD1,0),0),0x15,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitXOR($c, BitOR($b, (BitNOT($d)))) + $x[$k + 0x8],0) + 0x6FA87E4F,0),0),0x06,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitXOR($b, BitOR($a, (BitNOT($c)))) + $x[$k + 0xF],0) + 0xFE2CE6E0,0),0),0x0A,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitXOR($a, BitOR($d, (BitNOT($b)))) + $x[$k + 0x6],0) + 0xA3014314,0),0),0x0F,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitXOR($d, BitOR($c, (BitNOT($a)))) + $x[$k + 0xD],0) + 0x4E0811A1,0),0),0x15,"D")+$c,0)
    $a = BitOR(BitRotate(BitOR($a + BitOR(BitOR(BitXOR($c, BitOR($b, (BitNOT($d)))) + $x[$k + 0x4],0) + 0xF7537E82,0),0),0x06,"D")+$b,0)
    $d = BitOR(BitRotate(BitOR($d + BitOR(BitOR(BitXOR($b, BitOR($a, (BitNOT($c)))) + $x[$k + 0xB],0) + 0xBD3AF235,0),0),0x0A,"D")+$a,0)
    $c = BitOR(BitRotate(BitOR($c + BitOR(BitOR(BitXOR($a, BitOR($d, (BitNOT($b)))) + $x[$k + 0x2],0) + 0x2AD7D2BB,0),0),0x0F,"D")+$d,0)
    $b = BitOR(BitRotate(BitOR($b + BitOR(BitOR(BitXOR($d, BitOR($c, (BitNOT($a)))) + $x[$k + 0x9],0) + 0xEB86D391,0),0),0x15,"D")+$c,0)
    $a = BitOR($a + $AA,0)
    $b = BitOR($b + $BB,0)
    $c = BitOR($c + $CC,0)
    $d = BitOR($d + $DD,0)
    Next
    Return StringLower(StringMid(Hex($a),7,2) & StringMid(Hex($a),5,2) & StringMid(Hex($a),3,2) & StringMid(Hex($a),1,2) & _
    StringMid(Hex($b),7,2) & StringMid(Hex($b),5,2) & StringMid(Hex($b),3,2) & StringMid(Hex($b),1,2) & _
    StringMid(Hex($c),7,2) & StringMid(Hex($c),5,2) & StringMid(Hex($c),3,2) & StringMid(Hex($c),1,2) & _
    StringMid(Hex($d),7,2) & StringMid(Hex($d),5,2) & StringMid(Hex($d),3,2) & StringMid(Hex($d),1,2))
    EndFunc ;==>MD5

    [/autoit]

    Dateien

    vergleich.au3 11,36 kB – 296 Downloads
  • FileCreateDate ?

    • Oscar
    • 5. April 2008 um 07:51

    Benutze doch einen Hash-Algorithmus (z.B. MD5). Erstelle von file.list diesen Hashwert und speichere ihn ab (z.B. in eine INI-Datei). Beim nächsten Update-Check lädst Du wieder die file.list, erstellst wieder einen Hashwert und vergleichst diesen mit dem abgespeicherten. Sind die beiden Hashwerte unterschiedlich hat sich auch die Datei geändert. Dabei spielt die Dateigröße oder das -datum keine Rolle und der Hashwert ist auch dann ein anderer, wenn sich nur ein einzelner Buchstabe ändert.

  • md5 erstellen

    • Oscar
    • 4. April 2008 um 23:02

    Also ich finde ja diese Funktion ganz praktisch (AutoIt-Funktion, einfache Übergabe):

    MD5-Funktion

  • TaskManager sperren

    • Oscar
    • 4. April 2008 um 17:48

    Ja, ich denke auch, dass das so sein soll. Wollte nur eine Rückmeldung geben, dass es funktioniert.

    Obwohl: Vielleicht kennt ja jemand eine Möglichkeit, dass auch diese Fehlermeldung nicht auftritt?

  • TaskManager sperren

    • Oscar
    • 4. April 2008 um 15:31

    Bei mir kommt da eine Fehlermeldung:

    Screenshot:
    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    Der Taskmanager wird aber nicht geöffnet.

    Bilder

    • taskmanager.png
      • 7,63 kB
      • 365 × 126
  • Autoit's Funktionen

    • Oscar
    • 4. April 2008 um 15:24

    Ok, hier eine weitere Hilfe. Das Script von oben sieht als Funktion so aus:

    [autoit]


    $objWMIService = ObjGet("winmgmts:\\" & "localhost" & "\root\CIMV2")
    MsgBox(0,'',_Grafikkarte())

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

    Func _Grafikkarte()
    Local $Output, $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_DisplayConfiguration", "WQL", 0x30)
    If IsObj($colItems) then
    For $objItem In $colItems
    $Output = $objItem.DeviceName & @CRLF
    Next
    Endif
    Return $Output
    EndFunc

    [/autoit]

    Damit solltest Du das in Dein Programm einbinden können.

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™