ฟอรั่ม 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


2 posters

    จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ

    aut
    aut
    PSsix Powerful Scripting Class
    PSsix Powerful Scripting Class


    PSsix Game Coder
    จำนวนข้อความ : 472
    ความนิยม : 126
    เข้าร่วมเมื่อ : 24/07/2010

    จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ Empty จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ

    ตั้งหัวข้อ by aut 11/01/11, 09:15 pm

    คือเปิดดอสสั่ง dir ใน autoit ทีนี้จะเอาชื่อไฟลในหน้าต่างดอสออกมา ลองสั่งคลิกขวา select all มันไม่ได้อะคับ
    ชินจัง อยากได้ประมาณสั่ง dir แล้วเอาชื่อไฟล์มาใช้ใน autoit
    POS
    POS
    PSsix
    PSsix


    จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ Empty จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ Empty จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ Empty
    จำนวนข้อความ : 1152
    ความนิยม : 326
    เข้าร่วมเมื่อ : 19/07/2010

    จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ Empty Re: จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ

    ตั้งหัวข้อ by POS 13/01/11, 05:13 pm

    ใช้ $STDERR_CHILD + $STDOUT_CHILD เปลี่ยนทิศทางการส่งผลครับ ตัวอย่าง

    Code:

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <Constants.au3> ;เรียกเพื่อใช้ $STDERR_CHILD + $STDOUT_CHILD
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 429, 285, 192, 124)
    $Button1 = GUICtrlCreateButton("dir c:", 352, 8, 75, 25, $WS_GROUP)
    $Edit1 = GUICtrlCreateEdit("", 16, 8, 321, 273)
    GUICtrlSetData(-1, "")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

          Case $Button1
             $commandDir = Run(@ComSpec & " /c dir c:", @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    While 1
        $line = StdoutRead($commandDir )
        If @error Then ExitLoop
       if $line <> "" then  GUICtrlSetData($Edit1, $line & @LF)
    Wend

       EndSwitch
    WEnd
    aut
    aut
    PSsix Powerful Scripting Class
    PSsix Powerful Scripting Class


    PSsix Game Coder
    จำนวนข้อความ : 472
    ความนิยม : 126
    เข้าร่วมเมื่อ : 24/07/2010

    จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ Empty Re: จะก็อปตัวหนังสือในหน้าดอสมาใส่ใน autoit ทำไงคับ

    ตั้งหัวข้อ by aut 13/01/11, 08:09 pm

    ขอบคุณงับ ชินจัง2

      เวลาขณะนี้ 29/03/24, 05:18 am