ฟอรั่ม PSsix

Would you like to react to this message? Create an account in a few clicks or log in to continue.

ฟอรั่มของบล็อก http://pssix.blogspot.com


    โค้ดโปรแกรมบีบอัดไฟล์

    max30012540
    max30012540
    PSsix Member High Class
    PSsix Member High Class


    โค้ดโปรแกรมบีบอัดไฟล์ Empty PSsix Program Coder
    จำนวนข้อความ : 98
    ความนิยม : 10
    เข้าร่วมเมื่อ : 10/10/2011
    อายุ : 26

    โค้ดโปรแกรมบีบอัดไฟล์ Empty โค้ดโปรแกรมบีบอัดไฟล์

    ตั้งหัวข้อ by max30012540 23/10/11, 08:01 pm

    โค้ดของผมอาจจะดูแปลกๆ ผมใช้ความสามารถในการบีบไฟล์และคลายไฟล์ของ BAT File ครับ
    และผมจำไม่ได้แล้วครับว่าก๊อบโค้ดจากเว็บไหนมาดัดแปลงบ้างครับ

    Code:
    #include <GUIConstants.au3>

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("โปรแกรมบีบอัดไฟล์ คลายไฟล์ By Max", 331, 90, 193, 125)
    $Button1 = GUICtrlCreateButton("บีบอัดไฟล์", 24, 24, 129, 41, 0)
    $Button2 = GUICtrlCreateButton("คลายไฟล์", 176, 24, 129, 41, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

          Case $Button1
             min()

          Case $Button2
             max()
             
       EndSwitch
    WEnd

    Func min()
    $var = FileOpenDialog("กรุณาเลือกไฟล์ที่ต้องการบีบอัด","\", "All (*.*)", 1 + 4 )

    If @error Then
        Eixt()
    Else
        $var = StringReplace($var, "|", @CRLF)
        Run("makecab " & $var)
    EndIf
    EndFunc

    Func max()
    $var = FileOpenDialog("กรุณาเลือกไฟล์ที่ต้องการคลาย","\", "All (*.*)", 1 + 4 )

    If @error Then
        Eixt()
    Else
        $var = StringReplace($var, "|", @CRLF)
        Run("expand -r " & $var)
    EndIf
    EndFunc

    Func Eixt()
        MsgBox(4096,"Exit","คุณต้องการออก")
       Exit
    EndFunc

      เวลาขณะนี้ 26/04/24, 08:18 pm