MertCanDinler Posted January 29, 2012 Share Posted January 29, 2012 Herhanngi bir [b]resim[/b] dosyasındaki görüntüyü pc nin o[b] an ekranda ki görüntüde[/b] az önceki [b]resim[/b] dosyamızda bulunan [b]görüntüyü[/b] arayıp bulup mouse yi oraya oynatmasını istiyorum bunu nasıl yapabiliriz ? veya yapabilir miyiz ? Quote Link to comment Share on other sites More sharing options...
blue_life Posted January 29, 2012 Share Posted January 29, 2012 Pixel komutlarıyla yapılabilir. Örnek bir resim verirsen, basit bir örnek verebilirim... Quote Link to comment Share on other sites More sharing options...
MertCanDinler Posted January 29, 2012 Author Share Posted January 29, 2012 [img]http://xstreet.org/bilgisayarim.png[/img] mesela bu olsun Quote Link to comment Share on other sites More sharing options...
blue_life Posted January 29, 2012 Share Posted January 29, 2012 @MertCanDinler Kısaca önce belirlediğin pixeli aratacak ve yanındaki pixellerin değerine bakacaksın. Senin için bir örnek hazırladım. Biraz incele... [codebox]Local $SetArrayPixel[3] = [0x8BA2B8,0x80D9FF,0x8ADEFF] Local $GetPixsel = _PixelSearch($SetArrayPixel) If @error = 0 Then MouseMove($GetPixsel[0], $GetPixsel[1], 0) Func _PixelSearch($Pixsel_Array,$left = 0,$top = 0,$right = @DesktopWidth,$bottom = @DesktopHeight) If IsArray($Pixsel_Array) = 0 Then Return SetError(1,0,0) Local $Ubound = UBound($Pixsel_Array) -1 Local $I,$2, $GetPixsel, $Error While 1 Sleep(50) $Error = False For $I = 1 to ($right + $bottom) $GetPixsel = PixelSearch( $left, $top, $right, $bottom, $Pixsel_Array[0],0,1) If @error Then $Error = True ExitLoop EndIf For $2 = 1 to $Ubound If PixelGetColor($GetPixsel[0] + $2,$GetPixsel[1]) <> $Pixsel_Array[$2] Then $Error = True ExitLoop EndIf Next ExitLoop Next If $Error = True Then ContinueLoop Return $GetPixsel Sleep(50) WEnd EndFunc[/codebox] Quote Link to comment Share on other sites More sharing options...
MertCanDinler Posted January 29, 2012 Author Share Posted January 29, 2012 (edited) pixel değerlerinden tam olarak kastın nedr ? Anlamadm da dostm birde bu script dosyasının yanındaki herhangi bir uzantılı resim dosyasını direk aramaz mı ? Edited January 29, 2012 by MertCanDinler Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted January 29, 2012 Share Posted January 29, 2012 Pixel Değerlerinden kastı hex değerleri ve renk kodlarıydı.Ayrıca üstünde işlem yapmak isteğin resm sciptin yanında olmalı cünkü konum kodlarda konum belirtilmedi.. Quote Link to comment Share on other sites More sharing options...
MertCanDinler Posted January 29, 2012 Author Share Posted January 29, 2012 0x8BA2B8,0x80D9FF,0x8ADEFF dostum bunların hex olduğu ortada ama bu hexleri neye göre veya neyle buluyoruz onu sormştm bn ve işlem yapacağımız resm scriptin yanında olacakta blue_life nin verdiği kodda benim resmimi işlicek herhangi bir satır yok Quote Link to comment Share on other sites More sharing options...
blue_life Posted January 30, 2012 Share Posted January 30, 2012 @MertCanDinler Ilgili renk değerlerini sen aramak istediğin yere göre değiştirmelisin. Yukarıdaki verdiğim örnekte, ilgili üç renk kodu yan yana aranmaktadır ve bulunca mouse oraya taşınmaktadır. Ben ilgii renk kodlarını almak için [b]Xinec ColorConverter[/b] programını kullanıyorum. Bu konuda çok başarılı ve benim işimi görüyor... Upload ediyorum... [color="#0000FF"][u][b]http://bluelife.zxq.net/Files/Autoit/Tools/Pixel/xcc.rar[/b][/u][/color] Quote Link to comment Share on other sites More sharing options...
MertCanDinler Posted January 30, 2012 Author Share Posted January 30, 2012 @blue_life Yardım Ettiğin için Teşekkür Ederim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.