Jump to content

Distance Between Pixels


Recommended Posts

Is it possible to measure the distance between two pixels such as 326, 50 and 448, 756, and if it equals a certain distance perform and action?

Heres an example of what I want, the two black dots stand for pixels and the 644 pixels stands for the linear distance between them.

Posted Image

Edited by trippdoctor
Link to comment
Share on other sites

  • Moderators

You're using math on strings?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Say point A = X1,Y1

Say point B = X2,Y2

the distance in a straight line between the points is then

distance = ((X1 - X2)^2 + (Y1-Y2)^2)^0.5

EDIT: Removed references to zackrspv's post, and deleted my later posts which were replies to his posts because he deleted his posts and mine no longer made sense to anyone else reading this thread.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • Moderators

errr... I guess I should have quoted someone (zack lol ) ... because I look like I'm talking to myself since you deleted your posts!

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

errr... I guess I should have quoted someone (zack lol ) ... because I look like I'm talking to myself since you deleted your posts!

It's ok, i'm stupid, everyone knows who you were talking about :)

-_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...