View Single Post
Old 03-07-2018, 05:33 PM   #410
mdp
Wizard
mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.mdp ought to be getting tired of karma fortunes by now.
 
Posts: 1,481
Karma: 9010563
Join Date: Jul 2013
Device: none
@Sogaiu:
almost there,
the "popen" now must be
process = subprocess.Popen(['adb', 'logcat', 'OnyxMonitEv:I *:S'], stdout=subprocess.PIPE)
and the regular expression
line_re = re.compile("^(\d+)-(\d+) (\d+)\d+)\d+)\.(\d+).*?OnyxMonitEv: T?P<e>\d+)\|(?P<x>\d+),(?P<y>\d+)")

One scolio, the coordinates must be modified according to screen resolution (e.g. 2104x1560) and display resolution (presumably 2200x1650) - such as
mouse_x = tap_x*2104/2200
I cannot finish this evening...
mdp is offline   Reply With Quote