Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pixel information tool
#3
(02-08-2015, 11:18 AM)GkevinOD Wrote:  Autoit has an Information Window, you can use that to detect the location of the pixel. Use Finder Tool and get the pixel. In the 'Control' tab you can get the coordinates, 'Mouse' tab you can get the color.

I have seen that, but I don't think it takes into account the offset. I have tried to make a tool, but mine is very sad Sad I get the coords (assuming they are correct) and, sometimes, I get the color, but most of the time the color comes back as, 'FFFFFF'.

Try to hold back your laughter, but this is what I have so far:

Code:
#include <Misc.au3>
#include <WinAPI.au3>

Global $BSpos[2] ; Inside BlueStacks positions relative to the screen

$Title = "BlueStacks App Player for Windows (beta-1)" ; Window name
$Full = WinGetTitle ($Title) ; Get The Full Title..
$HWnD = WinGetHandle ($Full) ; Get The Handle
WinActivate ($HWnD)

Func getBSPos()
    $aPos = ControlGetPos($Title, "", "[CLASS:BlueStacksApp; INSTANCE:1]")
    $tPoint = DllStructCreate("int X;int Y")
    DllStructSetData($tPoint, "X", $aPos[0])
    DllStructSetData($tPoint, "Y", $aPos[1])
    _WinAPI_ClientToScreen(WinGetHandle(WinGetTitle($Title)), $tPoint)

    $BSpos[0] = DllStructGetData($tPoint, "X")
    $BSpos[1] = DllStructGetData($tPoint, "Y")
EndFunc   ;==>getBSPos

HotKeySet ("{F7}", "FindPos")
HotKeySet ("{F8}", "Terminate")

While 1
   Sleep (100)
WEnd

Func FindPos()
    getBSPos()
    Local $Pos[2]
    Local $iColour = 0
    While 1
        If _IsPressed("01") Then
            $Pos[0] = MouseGetPos()[0] - $BSpos[0]
            $Pos[1] = MouseGetPos()[1] - $BSpos[1]
            $iColour = Hex (PixelGetColor($Pos[0],$Pos[1]),6)
            ClipPut($Pos[0] & "," & $Pos[1] & "," & $iColour)
            Return $Pos
        EndIf
    WEnd
EndFunc   ;==>FindPos

Func Terminate()
   Exit
EndFunc   ;==>Terminate
Reply
 


Messages In This Thread
Pixel information tool - by Snarg - 02-08-2015, 11:08 AM
RE: Pixel information tool - by GkevinOD - 02-08-2015, 11:18 AM
RE: Pixel information tool - by Snarg - 02-08-2015, 11:27 AM
RE: Pixel information tool - by Henk500 - 02-09-2015, 03:22 AM
RE: Pixel information tool - by Snarg - 02-09-2015, 09:12 AM
RE: Pixel information tool - by Henk500 - 02-09-2015, 07:24 PM
RE: Pixel information tool - by safar46 - 02-08-2015, 01:11 PM
RE: Pixel information tool - by Mephobia - 02-08-2015, 04:43 PM
RE: Pixel information tool - by Henk500 - 02-08-2015, 10:19 PM
RE: Pixel information tool - by Snarg - 02-09-2015, 12:12 AM
RE: Pixel information tool - by Henk500 - 02-09-2015, 03:19 AM
RE: Pixel information tool - by kojometa - 02-09-2015, 01:47 AM
RE: Pixel information tool - by Snarg - 02-09-2015, 01:57 AM
RE: Pixel information tool - by dinobot - 02-09-2015, 03:47 AM
RE: Pixel information tool - by Henk500 - 02-09-2015, 07:01 AM
RE: Pixel information tool - by redclif - 02-09-2015, 04:43 PM
RE: Pixel information tool - by FastFrench - 02-12-2015, 03:31 AM
RE: Pixel information tool - by Snarg - 02-12-2015, 03:38 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)

About The Bytecode Club

We're a community forum focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website