Jump to content

need help for a command to rar


Wollf
 Share

Recommended Posts

because i have problem do a program that can rar with winrar and i dont have enough time to find out how exactly it works can anyone say me what exactly i should write?

i need the command to be at the $3 button that it is at the first if. the file can u can take it with @GUI_DRAGFILE, also winrar/rar.exe folder is at scriptdir

so if anyone can helpme plz help because i couldnt understand how it works and i dont have enough time.

#include <GuiConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>

$hGUI = GUICreate("Form1", 685, 629, -1, -1, -1, $WS_EX_ACCEPTFILES)
$Label1 = GUICtrlCreateLabel("Directories", 80, 24, 91, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Pic1 = GUICtrlCreatebutton("maths", 16, 68, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic1, "images/Maths.bmp")
$Pic2 = GUICtrlCreatebutton("Direction maths", 124, 68, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic2, "images/Mthsd.bmp")
$Pic3 = GUICtrlCreatebutton("geography", 16, 176, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic3, "images/geom.bmp")
$Pic4 = GUICtrlCreatebutton("Biology", 124, 176, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic4, "images/bio.bmp")
$Pic5 = GUICtrlCreatebutton("Ancient greek", 16, 284, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic5, "images/Ancient.bmp")
$Pic6 = GUICtrlCreatebutton("New greek", 124, 284, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic6, "images/new.bmp")
$Pic7 = GUICtrlCreatebutton("Geometry", 16, 392, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic7, "images/geo.bmp")
$Pic8 = GUICtrlCreatebutton("Propgramming tools", 124, 392, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic8, "images/Progerg.bmp")
$Pic9 = GUICtrlCreatebutton("propgramming", 16, 500, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic9, "images/prog.bmp")
$Pic10 = GUICtrlCreatebutton("physic", 124, 500, 100, 100, BitOr($GUI_SS_DEFAULT_BUTTON, $BS_BITMAP))
GUICtrlSetImage($Pic10, "images/Physic.bmp")

$3 = GUICtrlCreateButton("rar file", 325, 452, 125, 45, 0)
$1 = GUICtrlCreateButton("Send", 475, 452, 125, 45, 0)
$2 = GUICtrlCreateInput("Write your name here",370,70,155,25)
$Label2 = GUICtrlCreateLabel("Enter files in the box below", 365, 32, 417, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$cListBox = GUICtrlCreateList("", 350, 150, 200, 200)
GUICtrlSetState(-1, $GUI_DROPACCEPTED)

$button4 = GUICtrlCreateButton("Crete name folder",530,70,150,25)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $GUI_EVENT_DROPPED
            GUICtrlSetData($cListBox, @GUI_DRAGFILE & @CRLF, 1)
        EndSwitch
        if $msg = $3 Then
            
            EndIf
        If $msg = $1 then
            SoundPlay("Sounds/Connecting.mp3")
            EndIf
        if $msg = $pic1 then
            SoundPlay("Sounds/Maths.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\maths")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic1)  & "\")
            EndIf
            if $msg = $pic2 then
            SoundPlay("Sounds/Mathsd.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\Direction maths")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic2)  & "\")
            EndIf
            if $msg = $pic3 then
            SoundPlay("Sounds/Geo.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\geography")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic3)  & "\")
            EndIf
            if $msg = $pic4 then
            SoundPlay("Sounds/bio.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\Biology")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic4)  & "\")
            EndIf
            if $msg = $pic5 then
            SoundPlay("Sounds/Ancient.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\Ancient greek")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic5)  & "\")
            EndIf
            if $msg = $pic6 then
            SoundPlay("Sounds/Nea.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\New greek")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic6)  & "\")
            EndIf
            if $msg = $pic7 then
            SoundPlay("Sounds/Geom.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\Geometry")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic7)  & "\")
            EndIf
            if $msg = $pic8 then
            SoundPlay("Sounds/Prergdiad.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\Propgramming tools")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic8)  & "\")
            EndIf
            if $msg = $pic9 then
            SoundPlay("Sounds/Prog.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\propgramming")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic9)  & "\")
            EndIf
            if $msg = $pic10 then
            SoundPlay("Sounds/Physic.mp3")
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2) &"\physic")
            Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic10)  & "\")
        EndIf
        if $msg = $button4 Then
            DirCreate(@SCRIPTDIR &"\"& GUICtrlRead($2))
            EndIf
WEnd
Link to comment
Share on other sites

Check this to learn about rar commands..

See _RunDos from help file, to know how to run these dos commands.. or use Run with the ' /c' switch to run these rar commands using autoit..

No one will help u here if u don't help urself.. so if u don't have time, don't expect anyone else to make time for you.. and provide u with the readymade script..

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
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
 Share

  • Recently Browsing   0 members

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