Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image search help?
#2
I don't think you are factoring in the offset with your X/Y coords. Try the script below. It will get the coords and copy them to the clipboard. Change the first $Title line to match the title of your BlueStacks.

The F1 key will get the coords, taking into account the offset, of wherever you click.

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
Image search help? - by knowjack - 02-24-2015, 07:50 AM
RE: Image search help? - by Snarg - 02-24-2015, 09:18 AM
RE: Image search help? - by knowjack - 02-24-2015, 10:40 AM
RE: Image search help? - by Snarg - 02-24-2015, 02:04 PM
RE: Image search help? - by knowjack - 02-24-2015, 07:17 PM
RE: Image search help? - by Henk500 - 02-25-2015, 12:19 AM
RE: Image search help? - by knowjack - 02-25-2015, 06:14 AM
RE: Image search help? - by Snarg - 02-25-2015, 09:17 AM
RE: Image search help? - by terminus - 02-25-2015, 09:11 PM

Forum Jump:


Users browsing this thread: 4 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