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

Beiträge von DeepRed92

  • "Quicklaunch" Pfad auslesen?

    • DeepRed92
    • 18. Oktober 2009 um 18:53

    Wie bekomme ich den Pfad zum Quicklaunch Ordner? Macros scheint es dafür nicht zu geben. 8|

  • AutoIt BETA

    • DeepRed92
    • 17. Oktober 2009 um 00:18

    Hier:

    Spoiler anzeigen
    [autoit]

    #NoTrayIcon
    #cs ----------------------------------------------------------------------------

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

    AutoIt Version: 3.3.0.0
    Author: myName

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

    Script Function:
    Template AutoIt script.

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

    #ce ----------------------------------------------------------------------------

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

    ; Script Start - Add your code below here

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

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <StaticConstants.au3>
    #include <StructureConstants.au3>
    #include <GUIScrollBars.au3>
    #include <ScrollBarConstants.au3>
    #include <ListViewConstants.au3>

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

    Global $OldPos_1, $OldPos_2, $OldPos_3
    Global $CurrentPage = 1
    Global $ISCMDLINE = 0, $nMsg

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

    $MainGUI_Handle = GUICreate("News", 512, 347)

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

    GUICtrlCreateGraphic(0, 0, 512, 35)
    GUICtrlSetBkColor(-1, 0xFFFFFF)
    GUICtrlSetState(-1, $GUI_DISABLE)

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

    GUICtrlCreateLabel("", 0, 35, 512, 2, -1, $WS_EX_STATICEDGE)

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

    $Tab_News = GUICtrlCreateLabel(@CRLF & "Newsfeeds", 10, 0, 100, 35, $SS_CENTER)
    GUICtrlSetBkColor(-1, 0xC1D2EE)

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

    $Tab_PlugIns = GUICtrlCreateLabel(@CRLF & "Plug-Ins", 112, 0, 100, 35, $SS_CENTER)
    GUICtrlSetBkColor(-1, 0xFFFFFF)

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

    $Tab_Download = GUICtrlCreateLabel(@CRLF & "Plug-Ins herunterladen", 214, 0, 130, 35, $SS_CENTER)
    GUICtrlSetBkColor(-1, 0xFFFFFF)

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

    $TabGUI_1 = GUICreate("TabSheet1", 512, 310, 0, 37, $WS_CHILD, -1, $MainGUI_Handle)

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

    $TabGUI_2 = GUICreate("TabSheet2", 512, 310, 0, 37, $WS_CHILD, -1, $MainGUI_Handle)
    $TabGUI_2_ListView = GUICtrlCreateListView("Plug-Ins", 8, 8, 496, 260)
    GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 492)
    $TabGUI_2_Button_Update = GUICtrlCreateButton("Nach Updates suchen", 368, 275, 131, 25, $WS_GROUP)
    GUISetState(@SW_HIDE, $TabGUI_2)

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

    $TabGUI_3 = GUICreate("TabSheet3", 512, 310, 0, 37, $WS_CHILD, -1, $MainGUI_Handle)

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

    GUICtrlCreateInput("Suche nach Plug-Ins", 8, 8, 140, 23)

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

    GUICtrlCreateGraphic(8, 37, 496, 1)
    GUICtrlSetColor(-1, 0x7F9DB9)

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

    GUICtrlCreateGraphic(8, 302, 496, 1)
    GUICtrlSetColor(-1, 0x7F9DB9)

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

    GUICtrlCreateGraphic(7, 37, 1, 266)
    GUICtrlSetColor(-1, 0x7F9DB9)

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

    GUICtrlCreateGraphic(503, 37, 1, 266)
    GUICtrlSetColor(-1, 0x7F9DB9)

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

    $TabGUI_4 = GUICreate("TabSheet4", 496, 264, 8, 38, $WS_CHILD, -1, $TabGUI_3)
    _GUIScrollBars_Init($TabGUI_4)
    _GUIScrollBars_ShowScrollBar($TabGUI_4, $SB_HORZ, False)
    GUISetBkColor(0xFFFFFF, $TabGUI_4)
    GUISetState(@SW_SHOW, $TabGUI_4)

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

    GUISetState(@SW_HIDE, $TabGUI_3)
    GUISetState(@SW_SHOW, $MainGUI_Handle)

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

    While 1
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    WinSetState($MainGUI_Handle, "", @SW_HIDE)
    Exit

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

    Case $Tab_News
    If _IsPressedCtrl($MainGUI_Handle, $Tab_News) Then
    _SetWindowHide()
    _SetColor()
    $CurrentPage = 1
    _SetColor2()
    Else
    GUICtrlSetBkColor($Tab_PlugIns, 0xFFFFFF)
    EndIf

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

    Case $Tab_PlugIns
    If _IsPressedCtrl($MainGUI_Handle, $Tab_PlugIns) Then
    _SetWindowHide()
    GUISetState(@SW_SHOW, $TabGUI_2)
    _SetColor()
    $CurrentPage = 2
    _SetColor2()
    Else
    GUICtrlSetBkColor($Tab_PlugIns, 0xFFFFFF)
    EndIf

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

    Case $Tab_Download
    Switch $ISCMDLINE
    Case 0
    If _IsPressedCtrl($MainGUI_Handle, $Tab_Download) Then
    _SetWindowHide()
    GUISetState(@SW_SHOW, $TabGUI_3)
    _SetColor()
    $CurrentPage = 3
    _SetColor2()
    Else
    GUICtrlSetBkColor($Tab_PlugIns, 0xFFFFFF)
    EndIf
    Case 1
    _SetWindowHide()
    GUISetState(@SW_SHOW, $TabGUI_3)
    _SetColor()
    $CurrentPage = 3
    _SetColor2()
    $ISCMDLINE = 0
    EndSwitch
    EndSwitch
    $nMsg = GUIGetMsg()
    _Pic()
    WEnd

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

    Func _IsPressedCtrl($hWnd, $Control_Hwnd)
    $Cursorinfo99 = GUIGetCursorInfo($hWnd)
    If IsArray($Cursorinfo99) Then
    While $Cursorinfo99[4] = $Control_Hwnd
    $Cursorinfo99 = GUIGetCursorInfo($hWnd)
    If Not $Cursorinfo99[2] Then
    Return 1
    ExitLoop
    EndIf
    Sleep(10)
    WEnd
    EndIf
    Return 0
    EndFunc ;==>_IsPressedCtrl

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

    Func _Pic()
    $CursorInfo = GUIGetCursorInfo($MainGUI_Handle)
    Switch IsArray($CursorInfo)
    Case 1
    ;===========================================
    Switch $CursorInfo[4]
    Case $Tab_News
    Switch $CursorInfo[4]
    Case $OldPos_1
    Case Else
    If $CurrentPage <> 1 Then GUICtrlSetBkColor($Tab_News, 0xE0E8F6)
    $OldPos_1 = $CursorInfo[4]
    EndSwitch
    Case Else
    If $CursorInfo[4] <> $OldPos_1 Then
    Switch $CurrentPage
    Case 1
    GUICtrlSetBkColor($Tab_News, 0xC1D2EE)
    Case Else
    GUICtrlSetBkColor($Tab_News, 0xFFFFFF)
    EndSwitch
    $OldPos_1 = $CursorInfo[4]
    EndIf
    EndSwitch
    ;===========================================
    Switch $CursorInfo[4]
    Case $Tab_PlugIns
    Switch $CursorInfo[4]
    Case $OldPos_2
    Case Else
    If $CurrentPage <> 2 Then GUICtrlSetBkColor($Tab_PlugIns, 0xE0E8F6)
    $OldPos_2 = $CursorInfo[4]
    EndSwitch
    Case Else
    Switch $CursorInfo[4]
    Case $OldPos_2
    Case Else
    Switch $CurrentPage
    Case 2
    GUICtrlSetBkColor($Tab_PlugIns, 0xC1D2EE)
    Case Else
    GUICtrlSetBkColor($Tab_PlugIns, 0xFFFFFF)
    EndSwitch
    $OldPos_2 = $CursorInfo[4]
    EndSwitch
    EndSwitch
    ;===========================================
    Switch $CursorInfo[4]
    Case $Tab_Download

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

    Switch $CursorInfo[4]
    Case $OldPos_3
    Case Else
    If $CurrentPage <> 3 Then GUICtrlSetBkColor($Tab_Download, 0xE0E8F6)
    $OldPos_3 = $CursorInfo[4]
    EndSwitch
    Case Else
    Switch $CursorInfo[4]
    Case $OldPos_3
    Case Else
    Switch $CurrentPage
    Case 3
    GUICtrlSetBkColor($Tab_Download, 0xC1D2EE)
    Case Else
    GUICtrlSetBkColor($Tab_Download, 0xFFFFFF)
    EndSwitch
    $OldPos_3 = $CursorInfo[4]
    EndSwitch
    EndSwitch
    ;===========================================
    EndSwitch
    EndFunc ;==>_Pic

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

    Func _SetColor2()
    Switch $CurrentPage
    Case 1
    GUICtrlSetBkColor($Tab_News, 0xC1D2EE)
    Case 2
    GUICtrlSetBkColor($Tab_PlugIns, 0xC1D2EE)
    Case 3
    GUICtrlSetBkColor($Tab_Download, 0xC1D2EE)
    EndSwitch
    EndFunc ;==>_SetColor2

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

    Func _SetWindowHide()
    Switch $CurrentPage
    Case 1
    ;~ GUICtrlSetBkColor($Tab_News, 0xFFFFFF)
    ;~ GUISetState(@SW_HIDE, $TabGUI_1)
    Case 2
    GUISetState(@SW_HIDE, $TabGUI_2)
    Case 3
    GUISetState(@SW_HIDE, $TabGUI_3)
    EndSwitch
    EndFunc ;==>_SetWindowHide

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

    Func _SetColor()
    Switch $CurrentPage
    Case 1
    GUICtrlSetBkColor($Tab_News, 0xFFFFFF)
    Case 2
    GUICtrlSetBkColor($Tab_PlugIns, 0xFFFFFF)
    Case 3
    GUICtrlSetBkColor($Tab_Download, 0xFFFFFF)
    EndSwitch
    EndFunc ;==>_SetColor

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

    Du musst dabei auf Plug-Ins klicken. Danach taucht unten rechts ein Button auf. Jetzt beweg mal den Cursor über dem Button hin und her. Bei mir fangen nach 2 Sekunden die Labels oben an zu flackern.

  • AutoIt BETA

    • DeepRed92
    • 16. Oktober 2009 um 20:34

    peethebee : Ja genau so war das gestern bei mir auch. 8|

    Mal noch eine Frage nebenbei. Ist das eigentlich ein Bug, wenn ich eine GUI erstelle mit 3 Labels ,bei Mousehover die Farbe geändert wird und wenn man mit der Maus über einem Button geht die Labels flackern?

  • AutoIt BETA

    • DeepRed92
    • 16. Oktober 2009 um 17:49

    Hallo,

    kann es sein, dass gestern Abend die Version 3.3.1.2 Online war? Ich hatte das gestern nähmlich mit der Beta Version etwas herumprobiert und mir ist aufgefallen, dass die ganzen GUIs, InputBoxen und MsgBoxen im alten Windows Style waren. Heute ist die Version 3.3.1.3 Online und jetzt klappt es wieder.

    :huh:

  • Zertifikate für autoit.de-User

    • DeepRed92
    • 15. Oktober 2009 um 23:30

    Also man darf nicht vergessen, das au3-Scripte genauso gefährlich sein können. Es reichen nähmlich 2 "gefähliche" Befehle um einen Virus zu installieren:
    InetGet und Run. Sowas kann man nähmlich sehr schnell übersehen. Ich meine nicht jeder User guckt sich alle Zeilen bei einem Script an und führt das stattdessen sofort aus.

  • RibbonsBar (Office 2007 Bar) UDF

    • DeepRed92
    • 15. Oktober 2009 um 22:57

    Sieht echt spitze bis jetzt aus. Zur der Verzögerung hätte ich da eine Idee. Wieso erstellst du die Tabs nicht als Childfenster mit dem Style $WS_CHILD?
    Dann müsstet Du zwischen den Tabs nur per GUISetState @SW_Hide und @SW_Show schalten. ;)

  • InetGet Dateiname unbekannt

    • DeepRed92
    • 15. Oktober 2009 um 20:14

    Hey. Genau nach dem selben Prinzip funktioniert auch mein Programm. Allerdings hab ich das so gelöst. Auf dem Server ist eine Datei mit dem Inhalt 0.
    Ist ein Update vorhanden, wird der Wert auf1 geändert und das Programm lädt die nächste höhere Version herunter. Also ungefähr so:

    ftp://programm.de/de/latest/programm1.1.0.exe Auf dem Server steht "0"
    ftp://programm.de/de/latest/programm1.1.1.exe Auf dem Server steht "1"
    ftp://programm.de/de/latest/programm1.1.2.exe Auf dem Server steht "2"
    ftp://programm.de/de/latest/programm1.1.3.exe Auf dem Server steht "3"

    ich hoffe, ich konnte Dir helfen. :)

  • UDF für benutzerdefinierte ToolTips

    • DeepRed92
    • 15. Oktober 2009 um 20:07

    23 Downloads und ein Post? Naja

    wie ist eigentlich die ToolTip-Farbe unter Vista bzw. Windows 7? Immer noch gelb oder so in Richtung weiß?

  • RibbonsBar (Office 2007 Bar) UDF

    • DeepRed92
    • 14. Oktober 2009 um 09:54

    Ich hätte da schon eine Idee zur nächsten Version 0.3. Du könntest den Style $WS_POPUP setzen und auch noch die Close, Minimize und maximize Buttons einfügen. Ansonsten sieht das ja bis jetzt sehr gut aus ;) .

  • Programm aus Res Datei satrten

    • DeepRed92
    • 13. Oktober 2009 um 12:07

    Ich glaube die Funktion

    [autoit]


    #AutoIt3Wrapper_Res_File_Add=msgbox.exe

    [/autoit]

    ist da, um Icons in die Exe einzubinden.

  • Programm aus Res Datei satrten

    • DeepRed92
    • 13. Oktober 2009 um 11:46

    Eine sehr berechtigte Frage. Das wüsste ich auch allzu gern ^^

    Edit: Hmm eigentlich braucht man die Funktion nicht. Das geht ja auch mit Fileinstall

  • Farbübergangsbutton

    • DeepRed92
    • 13. Oktober 2009 um 01:52

    Hallo,

    wie kann sowas mit AutoIt erstellen. Es geht nur um die Farbübergänge bei den Buttons:

    [Blockierte Grafik: http://deepsoftware.spacequadrat.de/Downloads/www.…21632684012.jpg]

    Hier der Link zum VB Projekt: http://www.vb-gera.de/bibliothek/code/listpainter.htm
    und noch ein Link: http://www.vbarchiv.net/tipps/tipp_111…arbverlauf.html

  • UDF gesucht! (Breite von Zeichenketten in Pixel ermitteln)

    • DeepRed92
    • 13. Oktober 2009 um 01:19

    Eine Frage hab ich noch. Ich habe gerade erst bemerkt, das die Breite nicht ganz korrekt ist!?! Statt 100 steht da ca. 200 oder sowas.

    Hier mal ein Bild:

    [Blockierte Grafik: http://deepsoftware.spacequadrat.de/Downloads/www.AutoIt.de/Textmeter.jpg]

    Ist das normal?

  • UDF gesucht! (Breite von Zeichenketten in Pixel ermitteln)

    • DeepRed92
    • 12. Oktober 2009 um 23:03

    Jaaa, danke sehr Raupi. Genau das hab ich gesucht :thumbup:

  • UDF gesucht! (Breite von Zeichenketten in Pixel ermitteln)

    • DeepRed92
    • 12. Oktober 2009 um 22:57

    Hallo,

    ich weiß, das BugFix mal eine UDF geschrieben hat, mit der man die breite in pixel von Zeichenketten feststellen kann. Z.B.
    "Hallo" = 32 Pixel breit oder sowas.

    Ich komme jetzt aber überhaupt nicht mehr drauf, wie die UDF hieß und somit ist die Suchfunktion weniger sinnvoll ^^

    Ich hoffe ihr könnt mir dabei helfen.


    Vielen Dank schonmal! ;)

  • Ist das nur bei mir so?

    • DeepRed92
    • 12. Oktober 2009 um 15:00

    Hallo,

    ich habe gerade etwas richtig tolles entdeckt. Jeder kennt das Problem von GDI+. Das gemalte lässt sich wegwischen. Setzt man aber die Transparenz des Fensters auf 255 lässt es sich nicht mehr durch andere Fenster wegwischen.

    Ist das nur bei mir so? Ich habe Windows XP. Funktioniert das auch auf Vista?

    Spoiler anzeigen
    [autoit]

    #include <GuiConstantsEx.au3>
    #include <GDIPlus.au3>

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

    Opt('MustDeclareVars', 1)

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

    _Main()

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

    Func _Main()
    Local $hGUI, $hWnd, $hGraphic

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

    ; Erstellt eine GUI
    $hGUI = GUICreate("GDI+", 400, 300)
    WinSetTrans($hGUI,"",255)
    $hWnd = WinGetHandle("GDI+")
    GUISetState()

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

    ; Zeichnet einen String
    _GDIPlus_Startup()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    _GDIPlus_GraphicsDrawString($hGraphic, "Hallo Welt", 140, 110)

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

    ; Die Schleife wiederholt sich, bis der Benutzer die Beenden-Aktion der GUI auslöst
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

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

    ; Ressourcen freigeben
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

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

    EndFunc ;==>_Main

    [/autoit]
  • Suche funktionierende Zip UDF

    • DeepRed92
    • 12. Oktober 2009 um 14:39

    Also diese UDF funktioniert auf jeden Fall:

    Spoiler anzeigen
    [autoit]

    ; #VARIABLES# ===================================================================================================================
    Global $hDLL_7ZIP = DllOpen(@ScriptDir & "\7-zip32.dll")
    If $hDLL_7ZIP = -1 Then Exit 1

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

    Global Const $FNAME_MAX32 = 512
    Global $hArchiveProc

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

    ;File attributes constants
    Global Const $FA_RDONLY = 0x01 ;Reading private file
    Global Const $FA_HIDDEN = 0x02 ;Invisibility attribute file
    Global Const $FA_SYSTEM = 0x04 ;System file
    Global Const $FA_LABEL = 0x08 ;Volume label
    Global Const $FA_DIREC = 0x10 ;Directory
    Global Const $FA_ARCH = 0x20 ;Retention bit
    Global Const $FA_ENCRYPTED = 0x40 ;The password the file which is protected
    ; ===============================================================================================================================

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

    ; #STRUCTURES# ==================================================================================================================
    Global $tagINDIVIDUALINFO = "int dwOriginalSize;int dwCompressedSize;int dwCRC;uint uFlag;uint uOSType;short wRatio;" & _
    "short wDate;short wTime;char szFileName[" & $FNAME_MAX32 + 1 & "];char dummy1[3];" & _
    "char szAttribute[8];char szMode[8]"

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

    Global Const $tagEXTRACTINGINFO = "int dwFileSize;int dwWriteSize;char szSourceFileName[" & $FNAME_MAX32 + 1 & "];" & _
    "char dummy1[3];char szDestFileName[" & $FNAME_MAX32 + 1 & "];char dummy[3]"

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

    Global Const $tagEXTRACTINGINFOEX = $tagEXTRACTINGINFO & ";dword dwCompressedSize;dword dwCRC;uint uOSType;short wRatio;" & _
    "short wDate;short wTime;char szAttribute[8];char szMode[8]"
    ; ===============================================================================================================================

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipAdd
    ; Description ...: Adds files to archive
    ; Syntax.........: _7ZipAdd($hWnd, $sArcName, $sFileName[, $sHide = 0[, $sCompress = 5[, $sRecurse = 1[, $sIncludeFile = 0[, _
    ; $sExcludeFile = 0[, $sPassword = 0[, $sSFX = 0[, $sVolume = 0[, $sWorkDir = 0]]]]]]]]])
    ; Parameters ....: $hWnd - Handle to parent or owner window
    ; $sArcName - Archive file name
    ; $sFileName - File names to archive up
    ; $sHide - Use this switch if you want the CallBack function to be called
    ; $sCompress - Compress level 0-9
    ; $sRecurse - Recursion method: 0 - Disable recursion
    ; 1 - Enable recursion
    ; 2 - Enable recursion only for wildcard names
    ; $sIncludeFile - Include filenames, specifies filenames and wildcards or list file that specify processed files
    ; $sExcludeFile - Exclude filenames, specifies what filenames or (and) wildcards must be excluded from operation
    ; $sPassword - Specifies password
    ; $sSFX - Creates self extracting archive
    ; $sVolume - Specifies volumes sizes
    ; $sWorkDir - Sets working directory for temporary base archive
    ; Return values .: Success - Returns the string with results
    ; Failure - Returns 0 and and sets the @error flag to 1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipAdd($hWnd, $sArcName, $sFileName, $sHide = 0, $sCompress = 5, $sRecurse = 1, $sIncludeFile = 0, $sExcludeFile = 0, _
    $sPassword = 0, $sSFX = 0, $sVolume = 0, $sWorkDir = 0)

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

    $sArcName = '"' & $sArcName & '"'
    $sFileName = '"' & $sFileName & '"'

    Local $iSwitch = ""

    If $sHide Then $iSwitch &= " -hide"

    $iSwitch &= " -mx" & $sCompress
    $iSwitch &= _RecursionSet($sRecurse)

    If $sIncludeFile Then $iSwitch &= _IncludeFileSet($sIncludeFile)
    If $sExcludeFile Then $iSwitch &= _ExcludeFileSet($sExcludeFile)

    If $sPassword Then $iSwitch &= " -p" & $sPassword

    If FileExists($sSFX) Then $iSwitch &= " -sfx" & $sSFX

    If $sVolume Then $iSwitch &= " -v" & $sVolume

    If $sWorkDir Then $iSwitch &= " -w" & $sWorkDir

    Local $tOutBuffer = DllStructCreate("char[32768]")

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZip", _
    "hwnd", $hWnd, _
    "str", "a " & $sArcName & " " & $sFileName & " " & $iSwitch, _
    "ptr", DllStructGetPtr($tOutBuffer), _
    "int", DllStructGetSize($tOutBuffer))

    If Not $aRet[0] Then Return SetError(0, 0, DllStructGetData($tOutBuffer, 1))
    Return SetError(1, 0, 0)
    EndFunc ;==>_7ZipAdd

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipDelete
    ; Description ...: Deletes files from archive
    ; Syntax.........: _7ZipDelete($hWnd, $sArcName, $sFileName[, $sHide = 0[, $sCompress = 5[, $sRecurse = 1[, $sIncludeFile = 0[, _
    ; $sExcludeFile = 0[, $sPassword = 0[, $sWorkDir = 0]]]]]]])
    ; Parameters ....: $hWnd - Handle to parent or owner window
    ; $sArcName - Archive file name
    ; $sFileName - File names to deleting
    ; $sHide - Use this switch if you want the CallBack function to be called
    ; $sCompress - Compress level 0-9
    ; $sRecurse - Recursion method: 0 - Disable recursion
    ; 1 - Enable recursion
    ; 2 - Enable recursion only for wildcard names
    ; $sIncludeFile - Include filenames, specifies filenames and wildcards or list file that specify processed files
    ; $sExcludeFile - Exclude filenames, specifies what filenames or (and) wildcards must be excluded from operation
    ; $sPassword - Specifies password
    ; $sWorkDir - Sets working directory for temporary base archive
    ; Return values .: Success - Returns the string with results
    ; Failure - Returns 0 and and sets the @error flag to 1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipDelete($hWnd, $sArcName, $sFileName, $sHide = 0, $sCompress = 5, $sRecurse = 1, $sIncludeFile = 0, $sExcludeFile = 0, _
    $sPassword = 0, $sWorkDir = 0)

    $sArcName = '"' & $sArcName & '"'
    $sFileName = '"' & $sFileName & '"'

    Local $iSwitch = ""

    If $sHide Then $iSwitch &= " -hide"

    $iSwitch &= " -mx" & $sCompress
    $iSwitch &= _RecursionSet($sRecurse)

    If $sIncludeFile Then $iSwitch &= _IncludeFileSet($sIncludeFile)

    If $sExcludeFile Then $iSwitch &= _ExcludeFileSet($sExcludeFile)

    If $sPassword Then $iSwitch &= " -p" & $sPassword
    If $sWorkDir Then $iSwitch &= " -w" & $sWorkDir

    Local $tOutBuffer = DllStructCreate("char[32768]")

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZip", _
    "hwnd", $hWnd, _
    "str", "d " & $sArcName & " " & $sFileName & " " & $iSwitch, _
    "ptr", DllStructGetPtr($tOutBuffer), _
    "int", DllStructGetSize($tOutBuffer))

    If Not $aRet[0] Then Return SetError(0, 0, DllStructGetData($tOutBuffer, 1))
    Return SetError(1, 0, 0)
    EndFunc ;==>_7ZipDelete

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZIPExtract
    ; Description ...: Extracts files from archive to the current directory or to the output directory
    ; Syntax.........: _7ZIPExtract($hWnd, $sArcName[, $sOutput = 0[, $sHide = 0[, $sOverwrite = 0[, $sRecurse = 1[, _
    ; $sIncludeArc[, $sExcludeArc[, $sIncludeFile = 0[, $sExcludeFile = 0[, $sPassword = 0[, _
    ; $sYes = 0]]]]]]]]]])
    ; Parameters ....: $hWnd - Handle to parent or owner window
    ; $sArcName - Archive file name
    ; $sOutput - Output directory
    ; $sHide - Use this switch if you want the CallBack function to be called
    ; $sOverwrite - Overwrite mode: 0 - Overwrite All existing files without prompt, _
    ; 1 - Skip extracting of existing files, _
    ; 2 - Auto rename extracting file, _
    ; 3 - auto rename existing file
    ; $sRecurse - Recursion method: 0 - Disable recursion
    ; 1 - Enable recursion
    ; 2 - Enable recursion only for wildcard names
    ; $sIncludeArc - Include archive filenames
    ; $sExcludeArc - Exclude archive filenames
    ; $sIncludeFile - Include filenames, specifies filenames and wildcards or list file that specify processed files
    ; $sExcludeFile - Exclude filenames, specifies what filenames or (and) wildcards must be excluded from operation
    ; $sPassword - Specifies password
    ; $Yes - assume Yes on all queries
    ; Return values .: Success - Returns the string with results
    ; Failure - Returns 0 and and sets the @error flag to 1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZIPExtract($hWnd, $sArcName, $sOutput = 0, $sHide = 0, $sOverwrite = 0, $sRecurse = 1, $sIncludeArc = 0, $sExcludeArc = 0, _
    $sIncludeFile = 0, $sExcludeFile = 0, $sPassword = 0, $sYes = 0)

    $sArcName = '"' & $sArcName & '"'

    Local $iSwitch = ""

    If $sOutput Then $iSwitch = ' -o"' & $sOutput & '"'
    If $sHide Then $iSwitch &= " -hide"

    $iSwitch &= _OverwriteSet($sOverwrite)
    $iSwitch &= _RecursionSet($sRecurse)

    If $sIncludeArc Then $iSwitch &= _IncludeArcSet($sIncludeArc)
    If $sExcludeArc Then $iSwitch &= _ExcludeArcSet($sExcludeArc)

    If $sIncludeFile Then $iSwitch &= _IncludeFileSet($sIncludeFile)
    If $sExcludeFile Then $iSwitch &= _ExcludeFileSet($sExcludeFile)

    If $sPassword Then $iSwitch &= " -p" & $sPassword
    If $sYes Then $iSwitch &= " -y"

    Local $tOutBuffer = DllStructCreate("char[32768]")

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZip", _
    "hwnd", $hWnd, _
    "str", "e " & $sArcName & " " & $iSwitch, _
    "ptr", DllStructGetPtr($tOutBuffer), _
    "int", DllStructGetSize($tOutBuffer))

    If Not $aRet[0] Then Return SetError(0, 0, DllStructGetData($tOutBuffer, 1))
    Return SetError(1, 0, 0)
    EndFunc ;==>_7ZIPExtract

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZIPExtractEx
    ; Description ...: Extracts files from archive with full paths to the current directory or to the output directory
    ; Syntax.........: _7ZIPExtract($hWnd, $sArcName[, $sOutput = 0[, $sHide = 0[, $sOverwrite = 0[, $sRecurse = 1[, _
    ; $sIncludeArc[, $sExcludeArc[, $sIncludeFile = 0[, $sExcludeFile = 0[, $sPassword = 0[, _
    ; $sYes = 0]]]]]]]]]])
    ; Parameters ....: $hWnd - Handle to parent or owner window
    ; $sArcName - Archive file name
    ; $sOutput - Output directory
    ; $sHide - Use this switch if you want the CallBack function to be called
    ; $sOverwrite - Overwrite mode: 0 - Overwrite All existing files without prompt, _
    ; 1 - Skip extracting of existing files, _
    ; 2 - Auto rename extracting file, _
    ; 3 - auto rename existing file
    ; $sRecurse - Recursion method: 0 - Disable recursion
    ; 1 - Enable recursion
    ; 2 - Enable recursion only for wildcard names
    ; $sIncludeArc - Include archive filenames
    ; $sExcludeArc - Exclude archive filenames
    ; $sIncludeFile - Include filenames, specifies filenames and wildcards or list file that specify processed files
    ; $sExcludeFile - Exclude filenames, specifies what filenames or (and) wildcards must be excluded from operation
    ; $sPassword - Specifies password
    ; $Yes - assume Yes on all queries
    ; Return values .: Success - Returns the string with results
    ; Failure - Returns 0 and and sets the @error flag to 1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipExtractEx($hWnd, $sArcName, $sOutput = 0, $sHide = 0, $sOverwrite = 0, $sRecurse = 1, $sIncludeArc = 0, _
    $sExcludeArc = 0, $sIncludeFile = 0, $sExcludeFile = 0, $sPassword = 0, $sYes = 0)

    $sArcName = '"' & $sArcName & '"'

    Local $iSwitch = ""

    If $sOutput Then $iSwitch = ' -o"' & $sOutput & '"'
    If $sHide Then $iSwitch &= " -hide"

    $iSwitch &= _OverwriteSet($sOverwrite)
    $iSwitch &= _RecursionSet($sRecurse)

    If $sIncludeArc Then $iSwitch &= _IncludeArcSet($sIncludeArc)
    If $sExcludeArc Then $iSwitch &= _ExcludeArcSet($sExcludeArc)

    If $sIncludeFile Then $iSwitch &= _IncludeFileSet($sIncludeFile)
    If $sExcludeFile Then $iSwitch &= _ExcludeFileSet($sExcludeFile)

    If $sPassword Then $iSwitch &= " -p" & $sPassword
    If $sYes Then $iSwitch &= " -y"

    Local $tOutBuffer = DllStructCreate("char[32768]")

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZip", _
    "hwnd", $hWnd, _
    "str", "x " & $sArcName & " " & $iSwitch, _
    "ptr", DllStructGetPtr($tOutBuffer), _
    "int", DllStructGetSize($tOutBuffer))

    If Not $aRet[0] Then Return SetError(0, 0, DllStructGetData($tOutBuffer, 1))
    Return SetError(1, 0, 0)
    EndFunc ;==>_7ZIPExtractEx

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZIPUpdate
    ; Description ...: Update older files in the archive and add files that are new to the archive
    ; Syntax.........: _7ZIPUpdate($hWnd, $sArcName, $sFileName[, $sHide = 0[, $sCompress = 5[, $sRecurse = 1[, _
    ; $sIncludeFile = 0[, $sExcludeFile = 0[, $sPassword = 0[, $sSFX = 0[, $sWorkDir = 0]]]]]]]])
    ; Parameters ....: $hWnd - Handle to parent or owner window
    ; $sArcName - Archive file name
    ; $sFileName - File names to archive up
    ; $sHide - Use this switch if you want the CallBack function to be called
    ; $sCompress - Compress level 0-9
    ; $sRecurse - Recurse method: 0 - Disable recursion
    ; 1 - Enable recursion
    ; 2 - Enable recursion only for wildcard names
    ; $sIncludeFile - Include filenames, specifies filenames and wildcards or list file that specify processed files
    ; $sExcludeFile - Exclude filenames, specifies what filenames or (and) wildcards must be excluded from operation
    ; $sPassword - Specifies password
    ; $sSFX - Creates self extracting archive
    ; $sWorkDir - Sets working directory for temporary base archive
    ; Return values .: Success - Returns the string with results
    ; Failure - Returns 0 and and sets the @error flag to 1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipUpdate($hWnd, $sArcName, $sFileName, $sHide = 0, $sCompress = 5, $sRecurse = 1, $sIncludeFile = 0, $sExcludeFile = 0, _
    $sPassword = 0, $sSFX = 0, $sWorkDir = 0)

    $sArcName = '"' & $sArcName & '"'
    $sFileName = '"' & $sFileName & '"'

    Local $iSwitch = ""

    If $sHide Then $iSwitch &= " -hide"

    $iSwitch = " -mx" & $sCompress
    $iSwitch &= _RecursionSet($sRecurse)

    If $sIncludeFile Then $iSwitch &= _IncludeFileSet($sIncludeFile)
    If $sExcludeFile Then $iSwitch &= _ExcludeFileSet($sExcludeFile)

    If $sPassword Then $iSwitch &= " -p" & $sPassword
    If FileExists($sSFX) Then $iSwitch &= " -sfx" & $sSFX
    If $sWorkDir Then $iSwitch &= " -w" & $sWorkDir

    Local $tOutBuffer = DllStructCreate("char[32768]")

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZip", _
    "hwnd", $hWnd, _
    "str", "u " & $sArcName & " " & $sFileName & " " & $iSwitch, _
    "ptr", DllStructGetPtr($tOutBuffer), _
    "int", DllStructGetSize($tOutBuffer))

    If Not $aRet[0] Then Return SetError(0, 0, DllStructGetData($tOutBuffer, 1))
    Return SetError(1, 0, 0)
    EndFunc ;==>_7ZIPUpdate

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipSetOwnerWindowEx
    ; Description ...: Appoints the call-back function in order to receive the information of the compressing/unpacking
    ; Syntax.........: _7ZipSetOwnerWindowEx($hWnd, $sProcFunc)
    ; Parameters ....: $hWnd - Handle to parent or owner window
    ; $sProcFunc - The call-back function name
    ; Return values .: Success - Returns 1
    ; Failure - Returns 0
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipSetOwnerWindowEx($hWnd, $sProcFunc)
    If $hArchiveProc Then DllCallbackFree($hArchiveProc)
    $hArchiveProc = DllCallbackRegister($sProcFunc, "int", "hwnd;uint;uint;ptr")
    If $hArchiveProc = 0 Then Return SetError(1, 0, 0)

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipSetOwnerWindowEx", _
    "hwnd", $hWnd, _
    "ptr", DllCallbackGetPtr($hArchiveProc))
    Return $aRet[0]
    EndFunc ;==>_7ZipSetOwnerWindowEx

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipKillOwnerWindowEx
    ; Description ...: Cancels a window owner
    ; Syntax.........: _7ZipKillOwnerWindowEx($hWnd)
    ; Parameters ....: $hWnd - Handle to parent or owner window
    ; Return values .: Success - Returns 1
    ; Failure - Returns 0
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipKillOwnerWindowEx($hWnd)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipKillOwnerWindowEx", _
    "hwnd", $hWnd)
    Return $aRet[0]
    EndFunc ;==>_7ZipKillOwnerWindowEx

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipOpenArchive
    ; Description ...: Opens a arcive file
    ; Syntax.........: _7ZipOpenArchive($sArcName)
    ; Parameters ....: hWnd - Handle to parent or owner window
    ; $sArcName - Archive file name
    ; Return values .: Success - Returns a archive handle
    ; Failure - Returns 0
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipOpenArchive($hWnd, $sArcName)
    Local $hArc = DllCall($hDLL_7ZIP, "hwnd", "SevenZipOpenArchive", "hwnd", $hWnd, "str", $sArcName, "int", 0)
    Return $hArc[0]
    EndFunc ;==>_7ZipOpenArchive

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipCloseArchive
    ; Description ...: Closes a previously opened archive handle
    ; Syntax.........: _7ZipCloseArchive($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns 0
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipCloseArchive($hArc)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipCloseArchive", "hwnd", $hArc)
    Return $aRet[0]
    EndFunc ;==>_7ZipCloseArchive

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipFindFirst
    ; Description ...: Returns a $INDIVIDUALINFO structure with information of the first finded file
    ; Syntax.........: _7ZipFindFirst($hArc, $sSearch)
    ; Parameters ....: $hArc - Archive handle
    ; $sSearch - File search string. (wildcards are supported)
    ; Return values .: Success - Returns a $INDIVIDUALINFO structure
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipFindFirst($hArc, $sSearch)
    Local $INDIVIDUALINFO = DllStructCreate($tagINDIVIDUALINFO)

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipFindFirst", _
    "hwnd", $hArc, _
    "str", $sSearch, _
    "ptr", DllStructGetPtr($INDIVIDUALINFO))
    If $aRet[0] = -1 Then Return $aRet[0]
    Return $INDIVIDUALINFO
    EndFunc ;==>_7ZipFindFirst

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipFindNext
    ; Description ...: Returns a $tINDIVIDUALINFO structure according to a previous call to _7ZipFindFirst
    ; Syntax.........: _7ZipFindNext($hArc, $tINDIVIDUALINFO)
    ; Parameters ....: $hArc - Archive handle
    ; $tINDIVIDUALINFO - The $tINDIVIDUALINFO structure
    ; Return values .: Success - Returns a $INDIVIDUALINFO structure
    ; Failure - Returns 0
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipFindNext($hArc, $tINDIVIDUALINFO)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipFindNext", _
    "hwnd", $hArc, _
    "ptr", DllStructGetPtr($tINDIVIDUALINFO))
    If $aRet[0] = 0 Then Return $tINDIVIDUALINFO
    EndFunc ;==>SevenZipFindNext

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetFileName
    ; Description ...: Returns a file name
    ; Syntax.........: _7ZipGetFileName($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns a string with a file name
    ; Failure - Returns 0
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetFileName($hArc)
    Local $tNameBuffer = DllStructCreate("char[" & $FNAME_MAX32 + 1 & "]")

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipGetFileName", _
    "hwnd", $hArc, _
    "ptr", DllStructGetPtr($tNameBuffer), _
    "int", DllStructGetSize($tNameBuffer))
    If $aRet[0] = 0 Then Return DllStructGetData($tNameBuffer, 1)
    EndFunc ;==>_7ZipGetFileName

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetArcOriginalSize
    ; Description ...: Returns a original size of files in an archive
    ; Syntax.........: _7ZipGetArcOriginalSize($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns a total size
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetArcOriginalSize($hArc)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipGetArcOriginalSize", _
    "hwnd", $hArc)
    Return $aRet[0]
    EndFunc ;==>_7ZipGetArcOriginalSize

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetArcCompressedSize
    ; Description ...: Returns a compressed size of files in an archive
    ; Syntax.........: _7ZipGetArcCompressedSize($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns a total size
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetArcCompressedSize($hArc)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipGetArcCompressedSize", _
    "hwnd", $hArc)
    Return $aRet[0]
    EndFunc ;==>_7ZipGetArcCompressedSize

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetArcRatio
    ; Description ...: Returns a compressing ratio
    ; Syntax.........: _7ZipGetArcRatio($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns a compressing ratio
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetArcRatio($hArc)
    Local $aRet = DllCall($hDLL_7ZIP, "short", "SevenZipGetArcRatio", _
    "hwnd", $hArc)
    Return $aRet[0]
    EndFunc ;==>_7ZipGetArcRatio

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetDate
    ; Description ...: Returns a date of files in an archive
    ; Syntax.........: _7ZipGetDate($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns a date in an MSDOS format
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetDate($hArc)
    Local $aRet = DllCall($hDLL_7ZIP, "short", "SevenZipGetDate", _
    "hwnd", $hArc)
    If $aRet[0] = -1 Then Return $aRet[0]
    Return "0x" & Hex($aRet[0], 4)
    EndFunc ;==>_7ZipGetDate

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetTime
    ; Description ...: Returns a time of files in an archive
    ; Syntax.........: _7ZipGetTime($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns a time in an MSDOS format
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetTime($hArc)
    Local $aRet = DllCall($hDLL_7ZIP, "short", "SevenZipGetTime", _
    "hwnd", $hArc)
    If $aRet[0] = -1 Then Return $aRet[0]
    Return "0x" & Hex($aRet[0], 4)
    EndFunc ;==>_7ZipGetTime

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetCRC
    ; Description ...: Returns a CRC of files in an archive
    ; Syntax.........: _7ZipGetCRC($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns a CRC
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetCRC($hArc)
    Local $aRet = DllCall($hDLL_7ZIP, "dword", "SevenZipGetCRC", _
    "hwnd", $hArc)
    Return $aRet[0]
    EndFunc ;==>_7ZipGetCRC

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetAttribute
    ; Description ...: Returns a attribute of files in an archive
    ; Syntax.........: _7ZipGetAttribute($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns attribute of the file
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetAttribute($hArc)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipGetAttribute", _
    "hwnd", $hArc)
    If $aRet[0] = -1 Then Return $aRet[0]
    Return "0x" & Hex($aRet[0], 2)
    EndFunc ;==>_7ZipGetAttribute

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetMethod
    ; Description ...: Returns a string with the method of compressing
    ; Syntax.........: _7ZipGetMethod($hArc)
    ; Parameters ....: $hArc - Archive handle
    ; Return values .: Success - Returns the method of compressing
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetMethod($hArc)
    Local $sBUFFER = DllStructCreate("char[8]")

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

    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipGetMethod", _
    "hwnd", $hArc, _
    "ptr", DllStructGetPtr($sBUFFER), _
    "int", DllStructGetSize($sBUFFER))
    If $aRet[0] <> 0 Then Return False
    Return DllStructGetData($sBUFFER, 1)
    EndFunc ;==>_7ZipGetMethod

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZIPCheckArchive
    ; Description ...: Checks archive files
    ; Syntax.........: _7ZIPCheckArchive($sArcName)
    ; Parameters ....: $sArcName - Archive file name
    ; Return values .: Success - 1
    ; Failure - 0
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipCheckArchive($sArcName)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipCheckArchive", _
    "str", $sArcName, _
    "int", 0)
    Return $aRet[0]
    EndFunc ;==>_7ZIPCheckArchive

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetArchiveType
    ; Description ...: Returns the archive type
    ; Syntax.........: _7ZipGetArchiveType($sArcName)
    ; Parameters ....: $sArcName - Archive file name
    ; Return values .: Success: 1 - ZIPtype
    ; 2 - 7Ztype
    ; 0 - Unknown type
    ; Failure - -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetArchiveType($sArcName)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipGetArchiveType", _
    "str", $sArcName)
    Return $aRet[0]
    EndFunc ;==>_7ZIPGetArchiveType

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetFileCount
    ; Description ...: Returns the archive files count
    ; Syntax.........: _7ZipGetFileCount($sArcName)
    ; Parameters ....: $sArcName - Archive file name
    ; Return values .: Success - Returns the number of files
    ; Failure - Returns -1
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetFileCount($sArcName)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipGetFileCount", _
    "str", $sArcName)
    Return $aRet[0]
    EndFunc

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipConfigDialog
    ; Description ...: Shows a about dialog of the 7-zip32.dll
    ; Syntax.........: SevenZipConfigDialog($hWnd)
    ; Parameters ....: $hWnd - Handle to parent or owner window
    ; Return values .: Success - Returns 1
    ; Failure - Returns 0
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipConfigDialog($hWnd)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipConfigDialog", _
    "hwnd", $hWnd, _
    "ptr", 0, _
    "int", 0)
    Return $aRet[0]
    EndFunc ;==>SevenZipConfigDialog

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipQueryFunctionList
    ; Description ...: Checks whether or not API function which is appointed with 7-zip32.dll
    ; Syntax.........: _7ZipQueryFunctionList($iFunction)
    ; Parameters ....: $iFunction - The unique numerical value of the function
    ; Return values .: Success - Returns 1
    ; Failure - Returns 0
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipQueryFunctionList($iFunction = 0)
    Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZipQueryFunctionList", _
    "int", $iFunction)
    Return $aRet[0]
    EndFunc ;==>_7ZipQueryFunctionList

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetVersion
    ; Description ...: Returns a version of the 7-zip32.dll
    ; Syntax.........: _7ZipGetVersion()
    ; Parameters ....: None
    ; Return values .: The version number
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetVersion()
    Local $aRet = DllCall($hDLL_7ZIP, "short", "SevenZipGetVersion")
    Return StringLeft($aRet[0], 1) & "." & StringTrimLeft($aRet[0], 1)
    EndFunc ;==>_7ZipGetVersion

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _7ZipGetSubVersion
    ; Description ...: Returns a sub-version of the 7-zip32.dll
    ; Syntax.........: _7ZipGetSubVersion()
    ; Parameters ....: None
    ; Return values .: The sub-version number
    ; Author ........: R. Gilman (rasim)
    ; ===============================================================================================================================
    Func _7ZipGetSubVersion()
    Local $aRet = DllCall($hDLL_7ZIP, "short", "SevenZipGetSubVersion")
    Return $aRet[0]
    EndFunc ;==>_7ZipGetSubVersion

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

    ; #FUNCTIONS FOR INTERNAL USE# ==================================================================================================
    Func _RecursionSet($sVal)
    Switch $sVal
    Case 1
    Return " -r"
    Case 2
    Return " -r0"
    Case Else
    Return " -r-"
    EndSwitch
    EndFunc ;==>_RecursionSet

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

    Func _IncludeFileSet($sVal)
    If StringInStr($sVal, "*") Then
    Return ' -i!"' & $sVal & '"'
    ElseIf StringLeft($sVal, 1) = "@" Then
    Return ' -i"' & $sVal & '"'
    Else
    Return ' -i!"' & $sVal & '"'
    EndIf
    EndFunc ;==>_IncludeFileSet

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

    Func _ExcludeFileSet($sVal)
    If StringInStr($sVal, "*") Then
    Return ' -x!"' & $sVal & '"'
    ElseIf StringLeft($sVal, 1) = "@" Then
    Return ' -x"' & $sVal & '"'
    Else
    Return ' -x!"' & $sVal & '"'
    EndIf
    EndFunc ;==>_ExcludeFileSet

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

    Func _OverwriteSet($sVal)
    Switch $sVal
    Case 0
    Return " -aoa"
    Case 1
    Return " -aos"
    Case 2
    Return " -aou"
    Case 3
    Return " -aot"
    Case Else
    Return " -aoa"
    EndSwitch
    EndFunc ;==>_OverwriteSet

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

    Func _IncludeArcSet($sVal)
    If StringInStr($sVal, "*") Then
    Return ' -ai!"' & $sVal & '"'
    ElseIf StringLeft($sVal, 1) = "@" Then
    Return ' -ai"' & $sVal & '"'
    Else
    Return ' -ai!"' & $sVal & '"'
    EndIf
    EndFunc ;==>_IncludeArcSet

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

    Func _ExcludeArcSet($sVal)
    If StringInStr($sVal, "*") Then
    Return ' -ax!"' & $sVal & '"'
    ElseIf StringLeft($sVal, 1) = "@" Then
    Return ' -ax"' & $sVal & '"'
    Else
    Return ' -ax!"' & $sVal & '"'
    EndIf
    EndFunc ;==>_ExcludeArcSet

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

    Func OnAutoitExit()
    If IsDeclared("hDLL_7ZIP") Then
    DllClose($hDLL_7ZIP)
    If $hArchiveProc Then DllCallbackFree($hArchiveProc)
    EndIf
    EndFunc ;==>OnAutoitExit

    [/autoit]
  • Schlechte suche

    • DeepRed92
    • 12. Oktober 2009 um 14:00

    Ich benutze die Forensuche eigentlich fast nie sondern immer "site:https://autoit.de/www.autoit.de Suchbegriff".

  • Suche funktionierende Zip UDF

    • DeepRed92
    • 12. Oktober 2009 um 13:32

    Doch sie funktioniert!!! Es fehlt nur die 7-zip32.dll. Weiß jetzt nicht ob man das hier hochladen darf...

  • Alles gute ProgAndy

    • DeepRed92
    • 11. Oktober 2009 um 22:06

    Alles gute ProgAndy und danke für die vielen hilfreichen Beiträge. Feier schön ;)

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™