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


    สคิปหาสีจากเม้าชี้นะคับ

    อัต
    อัต
    PSsix Member Class III
    PSsix Member Class III


    สคิปหาสีจากเม้าชี้นะคับ Empty
    จำนวนข้อความ : 54
    ความนิยม : 9
    เข้าร่วมเมื่อ : 07/05/2011

    สคิปหาสีจากเม้าชี้นะคับ Empty สคิปหาสีจากเม้าชี้นะคับ

    ตั้งหัวข้อ by อัต 14/05/11, 04:24 pm

    ทำเป็นโปรแกรมมาเลยเปิดมาก้อเอาเม้าไปชี้ตงไหนก้อได้มานจะดึงเอาระหัสสีออกมานะงับ โคดแก้มาจากโคดท่าน pos ที่ทำให้นานแย้วจนจำม้ายด้าย 555555 เอาปายเล่นกันดูนะ


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <Misc.au3>

    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("หาสี", 385, 213, 192, 124)
    $Edit1 = GUICtrlCreateEdit("", 8, 8, 225, 193)
    GUICtrlSetData(-1, "")
    $Button1 = GUICtrlCreateButton("", 240, 8, 139, 105, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    Dim $gcolor2
    While 1

    While Not _IsPressed('02') ;กดปุ่มขวาเม้าปิดโปรแกรมนะ
    $pos = _WinAPI_GetMousePos()
    $gcolor = PixelGetColor(DllStructGetData($pos, "X"), DllStructGetData($pos, "Y"))
    If $gcolor <> $gcolor2 Then
    GUICtrlSetBkColor($Button1, $gcolor)
    GUICtrlSetData($Edit1, Hex($gcolor, 6))
    $gcolor2 = $gcolor
    EndIf
    Sleep(100)
    WEnd
    Exit
    Sleep(100)
    WEnd

    ชินจัง ชินจัง ชินจัง
    อัต
    อัต
    PSsix Member Class III
    PSsix Member Class III


    สคิปหาสีจากเม้าชี้นะคับ Empty
    จำนวนข้อความ : 54
    ความนิยม : 9
    เข้าร่วมเมื่อ : 07/05/2011

    สคิปหาสีจากเม้าชี้นะคับ Empty Re: สคิปหาสีจากเม้าชี้นะคับ

    ตั้งหัวข้อ by อัต 14/05/11, 04:32 pm

    แก้นิดนุง อานนี้แก้กดปุ่มขวาเม้าแล้วมานจะเซฟสีเอาไปใช้ได้เลยเอาปายเขียนโปรแกรมก้อกดปุ่ม Ctrl V ได้เลย

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    #include <Misc.au3>

    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("หาสี", 385, 213, 192, 124)
    $Edit1 = GUICtrlCreateEdit("", 8, 8, 225, 193)
    GUICtrlSetData(-1, "")
    $Button1 = GUICtrlCreateButton("", 240, 8, 139, 105, $WS_GROUP)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

    Dim $gcolor2
    While 1

    While Not _IsPressed('02') ;กดปุ่มขวาเม้าปิด
    $pos = _WinAPI_GetMousePos()
    $gcolor = PixelGetColor(DllStructGetData($pos, "X"), DllStructGetData($pos, "Y"))
    If $gcolor <> $gcolor2 Then
    GUICtrlSetBkColor($Button1, $gcolor)
    GUICtrlSetData($Edit1, Hex($gcolor, 6))
    $gcolor2 = $gcolor
    EndIf
    Sleep(100)
    WEnd
    ClipPut (Hex($gcolor, 6))
    Exit

    WEnd
    อัต
    อัต
    PSsix Member Class III
    PSsix Member Class III


    สคิปหาสีจากเม้าชี้นะคับ Empty
    จำนวนข้อความ : 54
    ความนิยม : 9
    เข้าร่วมเมื่อ : 07/05/2011

    สคิปหาสีจากเม้าชี้นะคับ Empty Re: สคิปหาสีจากเม้าชี้นะคับ

    ตั้งหัวข้อ by อัต 14/05/11, 04:35 pm

    ถ้าจาให้มันเซฟมี 0x ก้อเปี่ยนตง ClipPut (Hex($gcolor, 6)) เป็น ClipPut ("0x"&Hex($gcolor, 6)) เราเขียนแก้อันเด๋วก้อได้ ตอนนี้กะลังปั้มเนียนอ่านะ งิงิ ชินจัง

      เวลาขณะนี้ 29/03/24, 03:27 pm