mikahoy045 Posted June 19, 2015 Share Posted June 19, 2015 (edited) Okay, I know it's simple but i cant get it work. I want to do some pixel search function for defined area in defined application. Application that I need to get it work is Bluestack.Blue rectangle is the app (and it position sometimes get moved) -> I get the position using ControlGetPosnow I only want to pixel search only in red rectangle inside the app. position of red rectangle is 307,628,355,675 based on window info with windows coordinat mode.expandcollapse popupHotKeySet("{F2}", "mulai") HotKeySet("{F3}", "berhenti") Global $lokasi[2] Global $warna Global $penghitung Global $nyala Global $title = "BlueStacks App Player" Global $hwnd = WinGetHandle($title) Global $BSpos Func berhenti() Exit EndFunc ;==>berhenti Func getPos() $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 ;==>getPos Func mulai() $nyala = 1 While $nyala = 1 $pos = WinGetPos($hwnd) WinActivate($hwnd) $lokasi = PixelSearch($BSpos[0] , $BSpos[1], $BSpos[0] + $BSpos[2], $BSpos[1] + $BSpos[3], 0x0185B3) MouseMove($lokasi[0], $lokasi[1], 0) Sleep(200) If @error Then $penghitung = $penghitung + 1 EndIf If $penghitung > 5 Then $nyala = 0 EndIf WEnd EndFunc ;==>mulai While 1 Sleep(200) WEndBut It's not working, please help. Thanks in advance Edited June 19, 2015 by mikahoy045 Link to comment Share on other sites More sharing options...
Bert Posted June 19, 2015 Share Posted June 19, 2015 whats the name of the app inside bluestacks you want to run? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Rockerfeller Posted June 19, 2015 Share Posted June 19, 2015 (edited) I have no idea what the relevance of the above question is other than a trap, so bear in mind the forum rules before and if you decide to answer it.You should use some form of imagesearch to find the position and dimensions of the app icon, because to AutoIt everything in bluestacks is the same control. Edited June 19, 2015 by Rockerfeller Link to comment Share on other sites More sharing options...
Developers Jos Posted June 19, 2015 Developers Share Posted June 19, 2015 I have no idea what the relevance of the above question is other than a trap, so bear in mind the forum rules before and if you decide to answer it.You should use some form of imagesearch to find the position and dimensions of the app icon, because to AutoIt everything in bluestacks is the same control...and your interest in posting this is what? Maybe you should have PM'ed that, so let's not do this again.I am going to close this topic until the OP can convince me otherwise.*click* SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts