AutoTools X Y coordinates mismatch & Offset calculation

Discussion in 'AutoApps' started by Spamt, Dec 13, 2017.

  1. Spamt

    Spamt New Member

    Joined:
    Oct 20, 2017
    Messages:
    8
    Likes Received:
    0
    Hi,

    I'm playing around with autotools bubbles, and I'm having 2 issues with the positioning:

    1) I see that there is a mismatch in the X Y coordinates returned by the bubble's "Tap Up Position" on the one hand, and on the other hand the X Y coordinates as defined by the phone (found by using the developer options). Autoinput on the other hand uses the phone coordinates.
    After a lot of headscratching and testing I figured some things. One is that the the bubble counts the X from right to left, whereas the phone and autoinput from left to right.
    And I also found a workaround to get autoinput to interact with the bubble, but that involves various maths operations that seem odd. For the X axis the total of the autobubble-x and the autoinput-x must be 1020, and for the Y axis there is a permanent difference of 120 between the two.
    Am I missing some point? Is there a way to simply have the bubble return X Y coordinates that are identical to the phone's and to autoinput?


    2) The second question is about how offset is calculated. It doesn't seem to use the same scale as the coordinates. When I increase the offset by 100 in the "window settings", it moves the bubble by much more than that. Again, by experimenting I found that the bubble by 300 points for every 100 points increase in the windows setting.
    Is this correct? Is there a way to instruct the bubble to be created at specific X Y coordinates rather than by defining an offset? That would make it much more easy for example to have a bubble closed and then recreated at the exact same spot.


    Thanks for the help!
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi there! :)

    1. That probably happens because you're using right-gravity right? What happens if you set gravity to top left for example?
    2. The scale is in dip, so device independent pixels. That helps the bubble be positioned at the same real offset independently if a device's screen is small or large. Unfortunately there's no way to use real pixels right now, sorry!
    Hope this explains it.
     
  3. Spamt

    Spamt New Member

    Joined:
    Oct 20, 2017
    Messages:
    8
    Likes Received:
    0
    Thanks for the quick reply!

    1. Great! Setting the gravity top left aligned the orientation of the axes! I'm only left with a permanent (as in anywhere in the screen) offset of 60 on the X axis and 115 on the Y axis.
    Is that expected? No big deal either way, it just adds one extra operation to match the two, but I'm curious if that's usual or avoidable.

    2. Thanks for the clarification. If real pixel positioning ever become an option it will be great. In the meantime I got it working with the extra calculations.

    Thanks and happy holidays!

    Sent from my WAS-LX1A using Tapatalk
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Thank you very much :) I'm guessing that offset is related to the size of the bubble itself? Glad you got it working!
     

Share This Page