Jump to content

rar 7 zip help

Recommended Posts

hi guys i haven't posted here for a while :D now that i need help once more i decided to ask.

I am making simple program that will compensate for 1 missing feature in WinRar or 7-Zip

in other words this will compress multiple file and separate each new archive for each file by original file name.

WinRar or 7-zip can only compress one by one and i cant compress multiple files and have separated so i decided to make little script for my self.

I need help with displaying selected files somehow

i never got my self into tree or list types of commands so i am clueless where to start

here is my code.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("",600,240)

$RarExe = GUICtrlCreateinput ("C:\Program Files\WinRar\Rar.exe",0,0,200,20)
$RarBrowse = GUICtrlCreateButton ("Find WinRar",200,0,80,20)
$RarFileBrowse = GUICtrlCreateButton ("Open",200,20,80,20)
$RarClear = GUICtrlCreateButton("Clear",200,40,80,20)
$RarInput = GUICtrlCreateInput ("",0,20,200,20)
$RarOutPutName = GUICtrlCreateInput ("Output FileName",60,220,200,20)
$RarGO = GUICtrlCreateButton ("GO",0,220,60,20)

$7zipExe = GUICtrlCreateInput ("C:\Program Files\7-Zip\7z.exe",400,0,200,20)
$7zipBrowse = GUICtrlCreateButton ("Find 7-Zip",320,0,80,0)
$7zipFileBrowse = GUICtrlCreateButton ("Open",320,20,80,20)
$7zipClear = GUICtrlCreateButton("Clear",320,40,80,20)
$7zipInput = GUICtrlCreateInput ("",400,20,200,20)
$7zipOutPutName = GUICtrlCreateInput ("Output FileName",340,220,200,20)
$7zipGO = GUICtrlCreateButton ("GO",540,220,60,20)

$RarFileList = GUICtrlCreateListView ("",0,40,200,160)
$7zipFileList = GUICtrlCreateListView ("",400,40,200,160)

While 1
   $nMsg = GUIGetMsg()
   Switch $nMsg
    Case $RarBrowse ;rar.exe browser
        $RarFileValue = FileOpenDialog ("", @ProgramFilesDir & "\WinRar\", "WinRar executable (rar.exe)" , 1 + 4 )
        GUICtrlSetData ($RarInput,$RarFileValue) ;set path to winrar
    Case $7zipBrowse
        $7zipFileValue = FileOpenDialog ("", @ProgramFilesDir & "\7-Zip\", "7-Zip Executable (7z.exe)" , 1 + 4 )
        GUICtrlSetData ($7zipInput,$7zipFileValue) ;set path to 7zip
    Case $RarFileBrowse ;file sellector
        $RarFiles = FileOpenDialog ("", @ScriptDir & "\", "All (*.*)" , 1 + 4 )
        ;GUICtrlCreateList ($RarFileList,$RarFiles)
    Case $7zipFileBrowse ;file sellector
       Case $GUI_EVENT_CLOSE

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...