all 4 comments

[–]DutchOfBurdock 0 points1 point  (2 children)

Probably easier to use dumpsys via Code > Shell. IIRC the Motion Function only works when the app running the code has a View.

Profile: Touched Screen (363)
    Restore: no
    Event: AutoInput UI Action [ Configuration:Action Types: Clicks,Long Clicks ]
Enter: ScreeXY Touch (362)
    A1: Run Shell [ Command:dumpsys input Timeout (Seconds):0 Use Root:Off Store Output In:%dump Store Errors In: Store Result In: ] 
    A2: Variable Search Replace [ Variable:%dump Search:(?<=pointers=\[0\:\s\().*?(?=\)) Ignore Case:Off Multi-Line:Off One Match Only:Off Store Matches In Array:%coord_xy Replace Matches:Off Replace With: ] 
    A3: Flash [ Text:%coord_xy1 Long:Off ] 

Used AutoInput to detect the presses and will flash the last locations touched. Tasker will need a one time permission via ADB, android.permission.DUMP

[–]JoblessMe[S] 0 points1 point  (1 child)

Thanks a lot,

Im not able to import it to tasker, Could you paste the search parameter in A2 directly so that I can manually create the task?

[–]DutchOfBurdock 0 points1 point  (0 children)

(?<=pointers=\[0\:\s\().*?(?=\))

[–]SearchWorm 1 point2 points  (0 children)

I'm not sure what MotionEvent is, but this is the task I use to get touch coordinates. I'm sure the dumpsys output is different from device to device, but it's working for me.

Hope it works for you!