Hipparchus, who used an eclipse of the Moon to deduce the precession of the equinoxes (See the chapter “Precession" in the From Stargazers to Starships FlexBook® resource on www.ck12.org), used a total eclipse of the Sun --- probably in 129 BC--to estimate how far the Moon was. That distance had also been derived from a lunar eclipse by Aristachus--see the chapter “Estimating the Distance to the Moon" in the From Stargazers to Starships FlexBook® resource on www.ck12.org.
That eclipse was total at the Hellespont --- the Dardanelles, part of the narrow strait that separates the European and Asian parts of Turkey --- but only 4/5 of the Sun were covered in Alexandria of Egypt, further to the south.
Hipparchus knew that when the Sun was eclipsed, it and the Moon occupied the same spot on the sphere of the heavens. The reason, he assumed, was that the Moon passed between us and the Sun.
He believed that the Sun was much more distant than the Moon, as Aristarchus of Samos had concluded, about a century earlier, from observing the time when the Moon was exactly half full (see chapters “Estimating the Distance to the Moon" and “Does the Earth Revolve Around the Sun" in the From Stargazers to Starships FlexBook® resource on www.ck12.org). He also assumed that the peak of the eclipse occurred at the same time at both locations (not assured, but luckily not too far off), and he then carried out the following calculation.