Extract File by C0dex

  • Meine Proyect :)

    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ListViewConstants.au3>
    #include <ProgressConstants.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <File.au3>
    #include <Array.au3>
    #include <GuiMenu.au3>
    #include <GuiListView.au3>
    #include <GuiListBox.au3>

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

    $Form1 = GUICreate("Extragere Fisier by C0dex v2.1", 627, 569, 192, 124)
    $Button1 = GUICtrlCreateButton("Adauga Folder", 8, 8, 99, 25, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Input1 = GUICtrlCreateInput("Running...", 112, 8, 505, 24, -1, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
    $Label1 = GUICtrlCreateLabel("Arata doar fisier cu extensia :", 8, 40, 204, 23, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlSetBkColor(-1, 0xFF0000)
    $Input2 = GUICtrlCreateInput("txt", 216, 40, 81, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetFont(-1, 9, 800, 0, "Comic Sans MS")
    $Button2 = GUICtrlCreateButton("Salveaza Lista Fisierelor", 304, 40, 163, 25, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button3 = GUICtrlCreateButton("Sterge Lista", 472, 40, 147, 25, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $ListView1 = GUICtrlCreateListView("Numar Fisier|Nume Fisier", 8, 72, 610, 366)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 700)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Progress1 = GUICtrlCreateProgress(8, 448, 610, 17)
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlSetBkColor(-1, 0xFF0000)
    $Button4 = GUICtrlCreateButton("Arata Statistica cu procentaj % din toate fisierele ", 8, 472, 611, 25, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Label2 = GUICtrlCreateLabel("Extensia selectata de tine este :", 8, 504, 215, 23, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlSetBkColor(-1, 0xFF0000)
    $Input3 = GUICtrlCreateInput("", 232, 504, 81, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetFont(-1, 9, 800, 0, "Comic Sans MS")
    $Label3 = GUICtrlCreateLabel("Fisiere ramase alte extensi:", 320, 504, 182, 23, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 10, 800, 0, "Comic Sans MS")
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlSetBkColor(-1, 0xFF0000)
    $Input4 = GUICtrlCreateInput("", 512, 504, 105, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetFont(-1, 9, 800, 0, "Comic Sans MS")
    $Button5 = GUICtrlCreateButton("Contact", 8, 536, 163, 25, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button6 = GUICtrlCreateButton("Info", 176, 536, 163, 25, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Button7 = GUICtrlCreateButton("Exit Programm", 344, 536, 163, 25, -1, $WS_EX_STATICEDGE)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Label4 = GUICtrlCreateLabel("By C0dex ", 512, 538, 106, 21, $SS_CENTER, BitOR($WS_EX_STATICEDGE,$GUI_WS_EX_PARENTDRAG))
    GUICtrlSetFont(-1, 9, 800, 0, "Palatino Linotype")
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlSetBkColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    Case $Button1
    $adauga = FileSelectFolder("Adauga Folder",@DesktopCommonDir,1+2+4,"",$Form1)
    GUICtrlSetData($Input1,$adauga)
    $fisiere= _FileListToArrayEx($adauga,"*."&GUICtrlRead($Input2),12)
    If IsArray($fisiere) Then
    For $i = 1 To $fisiere[0]
    GUICtrlCreateListViewItem($I&"|"&$fisiere[$i], $ListView1)
    GUICtrlSetData($Progress1,$i+100-$i)
    Next
    MsgBox(0,"","Afisare completa !")
    EndIf
    #cs
    ProgressOn("Progress Meter", "Increments every second", "0 percent")
    For $i = 10 To 100 Step 10
    Sleep(1000)
    ProgressSet($i, $i & " percent")
    Next
    ProgressSet(100, "Done", "Complete")
    Sleep(500)
    ProgressOff()
    #ce

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

    Case $Button2
    salveazatxt()
    º
    case $Button3
    $stergere = _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($ListView1))

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

    Case $Button4
    GUICtrlSetData($Input3,_GUICtrlListView_GetItemCount($ListView1))
    $toate = _FileListToArrayEx($adauga,"*.*",12)
    For $ii = 1 To $toate[0]
    GUICtrlSetData($Input4,$ii-GUICtrlRead($Input3))
    Next

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

    Case $Button5
    ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Warning
    MsgBox(48,"Info","Created by C0dex" & @CRLF & "Contact : hellshare60@gmail.com" & @CRLF & "__________________________")

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

    Case $Button6
    ;MsgBox features: Title=Yes, Text=Yes, Buttons=OK, Icon=Info
    MsgBox(64,"Info","Acest Programm a fost creat de catre C0dex" & @CRLF & "Anul = 2012/2013" & @CRLF & "---------------------------------------------------------------------" & @CRLF & "HELLSHARE60@GMAIL.COM" & @CRLF & "---------------------------------------------------------------------" & @CRLF & "Toate drepturile rezervate." & @CRLF & "---------------------------------------------------------------------" & @CRLF & "-------------------------Bye --------------------------------------")

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

    Case $Button7
    Exit(-1)

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

    EndSwitch
    WEnd

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

    Func _FileListToArrayEx($sPath, $sFilter = "*", $iFlag = 0)
    Local $hSearch, $sFile, $sFileList, $iFlags = StringReplace(BitAND($iFlag, 1) + BitAND($iFlag, 2), "3", "0"), $sSDir = BitAND($iFlag, 4), $FPath = "", $sDelim = "|", $sSDirFTMP = $sFilter
    $sPath = StringRegExpReplace($sPath, "[\\/]+\z", "") & "\"
    If Not FileExists($sPath) Then Return SetError(1, 1, "")
    If BitAND($iFlag, 8) Then $FPath = $sPath
    If StringRegExp($sFilter, "[\\/:><]|(?s)\A\s*\z") Then Return SetError(2, 2, "")
    If Not ($iFlags = 0 Or $iFlags = 1 Or $iFlags = 2 Or $sSDir = 4 Or $FPath <> "") Then Return SetError(3, 3, "")
    $hSearch = FileFindFirstFile($sPath & "*")
    If @error Then Return SetError(4, 4, "")
    Local $hWSearch = $hSearch, $hWSTMP = $hSearch, $SearchWD, $sSDirF[3] = [0, StringReplace($sSDirFTMP, "*", ""), "(?i)(" & StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace(StringRegExpReplace("|" & $sSDirFTMP & "|", '\|\h*\|[\|\h]*', "\|"), '[\^\$\(\)\+\[\]\{\}\,\.\]', "\\$0"), "\|([^\*])", "\|^$1"), "([^\*])\|", "$1\$\|"), '\*', ".*"), '^\||\|$', "") & ")"]
    While 1
    $sFile = FileFindNextFile($hWSearch)
    If @error Then
    If $hWSearch = $hSearch Then ExitLoop
    FileClose($hWSearch)
    $hWSearch -= 1
    $SearchWD = StringLeft($SearchWD, StringInStr(StringTrimRight($SearchWD, 1), "\", 1, -1))
    ElseIf $sSDir Then
    $sSDirF[0] = @extended
    If ($iFlags + $sSDirF[0] <> 2) Then
    If $sSDirF[1] Then
    If StringRegExp($sFile, $sSDirF[2]) Then $sFileList &= $sDelim & $FPath & $SearchWD & $sFile
    Else
    $sFileList &= $sDelim & $FPath & $SearchWD & $sFile
    EndIf
    EndIf
    If Not $sSDirF[0] Then ContinueLoop
    $hWSTMP = FileFindFirstFile($sPath & $SearchWD & $sFile & "\*")
    If $hWSTMP = -1 Then ContinueLoop
    $hWSearch = $hWSTMP
    $SearchWD &= $sFile & "\"
    Else
    If ($iFlags + @extended = 2) Or StringRegExp($sFile, $sSDirF[2]) = 0 Then ContinueLoop
    $sFileList &= $sDelim & $FPath & $sFile
    EndIf
    WEnd
    FileClose($hSearch)
    If Not $sFileList Then Return SetError(4, 4, "")
    Return StringSplit(StringTrimLeft($sFileList, 1), "|")
    EndFunc

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

    Func salveazatxt()
    $sfile = FileSaveDialog("Salvati Fisierele",@DesktopDir,"Text files (*.txt)","",GUICtrlRead($ListView1),$Form1)
    If Not @error Then
    Local $file = FileOpen($sfile&".txt", 1)
    For $i = 0 To _GUICtrlListView_GetItemCount($ListView1)-1
    FileWrite($file,_GUICtrlListView_GetItemTextString($ListView1,$i)&@CRLF)
    Next
    EndIf
    EndFunc

    [/autoit]

    Edit (Xeno) : Spoiler.
    Tank's AutoiT.DE :thumbup:

    Einmal editiert, zuletzt von Xenobiologist (9. Januar 2013 um 18:28)

  • Warum Projekt?
    Was wird es denn?
    Beschreibung?


    Beschreibung und alles wäre toll...

    @Xeno: Du wirst wenn nur eine Google Übersetzer - Antwort bekommen, der ist Spanier ... dürfte sich verirrt haben 8|


    @Cyber: Do you speak English? And translate this script, we don't know what to do with it. :)

    There's a joke that C has the speed and efficieny of assembly language combined with readability of....assembly language. In other words, it's just a glorified assembly language. - Teh Interwebz

    C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, you blow off your whole leg. - Bjarne Stroustrup
    Genie zu sein, bedeutet für mich, alles zu tun, was ich will. - Klaus Kinski

  • Dies ist mein erstes Projekt oder Programm nicht leid, wenn Sie etwas anderes Grüße verstehen
    AutoiT.De :thumbup:

  • In diesem Fal nichts wie ich jetzt auch festgestellt habe :sleeping: . Sorry PainTain. Ich hatte mich bereits am Montag über PN-Zitate in [ offen ] Hilfeee ! geärgert und dies vorhin mit dir in Verbindung gebracht.

    mfg autoBert


    Kein Problem :)

    @Topic: Warum spricht er nicht English bzw. übersetzt in English? Nach English sind die Übersetzungen -meiner Erfahrung nach- besser.
    Wie könnensolche "Nicht-Deutsch sprechenden" Leute sich überhaupt hierher verirren?

    Mfg

    There's a joke that C has the speed and efficieny of assembly language combined with readability of....assembly language. In other words, it's just a glorified assembly language. - Teh Interwebz

    C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, you blow off your whole leg. - Bjarne Stroustrup
    Genie zu sein, bedeutet für mich, alles zu tun, was ich will. - Klaus Kinski

  • Wie könnensolche "Nicht-Deutsch sprechenden" Leute sich überhaupt hierher verirren?


    Weil sie Löungen suchen die sie sich hier erhoffen. Das Skript ist relativ einfach gehalten beim analysieren hat man nur geringfügig mehr Probleme wie bei anderen Skripten ohne "für sich sprechende Namen". Die einzige Aktion die für mich keinen Sinn ergibt ist die Statistik? (Button4) hier wäre es hifreich den dazughörigen Labeltext zu verstehen. Im Skript selbst habe ich (oder war es AU3Check?) nur einen Fehller gefunden, da mir aber das Gelesene (davon Bruchstücke verstanden) zu UEZ's 2. Link nicht gefällt:

    Zitat

    Soi C0dex(Fabian)
    Me gusta programmar en Autoit ,Sql injection database y me gustaria aprender mucha mas cosas con vosotros un abrazo ! :smt023

    Codex

    Mensajes: 2
    Registrado: 30 Oct 2012, 22:20

    behalte ich es für mich.

    PS.: MACH dir nichts aus der dir von mir zugeordneten GRAFIK

    mfg autoBert

  • Ich verstehe nicht, dass wenn ich nicht vorbei bin spanischen zusammenarbeiten können und sich gegenseitig helfen?
    :wacko:

    • Offizieller Beitrag

    Por supuesto que podemos tratar de ayudarle.
    Sin embargo, no todo el mundo quiere tener que examinar el código fuente del programa. Por lo tanto, una descripción del programa fue llamado.
    ¿Dónde estamos por la ayuda?
    También sería bueno si se puede traducir Español al Inglés. La traducción funciona mucho mejor que en Alemania. ¡GRACIAS!