Jump to content
Sign in to follow this  
darendeli

Gui Finder

Recommended Posts

Gui Finder i kullanarak coordinat ve pixel rengini almak istiyorum  kütüphanesinde degisiklik mi yapmak gerekli sürükleyip bırakınca biriyle coordinat biriyle renk almak istiyorum

#include<GUIFinder.au3>

$hGUI = GUICreate("guifinder deneme", 300, 100)

$hFinder = _GUICtrlFinder_Create($hGUI, 230, 4)
$Input1 = GUICtrlCreateInput("", 5, 10)

$hFinder2 = _GUICtrlFinder_Create($hGUI, 230, 54)
$Input1 = GUICtrlCreateInput("", 5, 60)
GUISetState(@SW_SHOW)
GUISetState()


While True
    $iMsg  = GUIGetMsg()
    Switch $iMsg
        Case -3
            ExitLoop
    EndSwitch
WEnd

 

Share this post


Link to post
Share on other sites

Merhaba,

GuiFinderin örneklerinden kullanarak şöyle birşey yazdım sizin için arkaplan rengi derken pencerenin arkaplan rengi her yerde farklı olabilir o biraz sağlıksız oldu bilesiniz.

#include <Array.au3>
#include<GUIFinder.au3>
Global $son = ""
$hGUI = GUICreate("guifinder deneme", 300, 100)

$hFinder1 = _GUICtrlFinder_Create($hGUI, 230, 4)
$hBtn1 = GUICtrlCreateButton("Konum/Renk Bul!", 130, 4, 90, 25)
$Input1 = GUICtrlCreateInput("", 4, 5,120,23)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")

While True
    $iMsg  = GUIGetMsg()
    Switch $iMsg
        Case -3
            ExitLoop
		Case $hBtn1
			_GUICtrlFinder_SetLastWnd($hFinder1, $hGUI)
			if IsHWnd($son) and Kontrol() then
				$Position = WinGetPos ($son)
				MsgBox(0,"Sonuç: "&WinGetTitle($son),"Pencerenizin pozisyonu:"&@CRLF&@CRLF&"X: "&$Position[0]&@CRLF&"Y: "&$Position[1]&@CRLF&"Genişlik: "&$Position[2]&@CRLF&"Yükseklik: "&$Position[3]&@CRLF&@CRLF&"Arkaplan Rengi: "&Hex(PixelGetColor(1,1,$son), 6))
			EndIf
    EndSwitch
WEnd

Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)
	Switch _WinAPI_HiWord($wParam)
		Case $FN_ENDUSE
		$son = _GUICtrlFinder_GetLastWnd($lParam)
	EndSwitch
EndFunc

Func Kontrol()
	Local $aList = WinList()
    For $i = 1 To $aList[0][0]
        If $son = $aList[$i][1] Then
            Return True
        EndIf
    Next
	Return False
EndFunc

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...