Now now Manny, you're changing the rules. You simply asked for the longest distance, ship to ship. No mentioning of manuevering/at speed was made. It sounds as if you had a pre conceived answer already in mind, rather than an all encompassing question.
Yes a stationary target is easier to hit, but from a manuevering firing platform, it is still not an easy feat. Not to mention that the US fleet was being enaged by French Naval and shore based forces. (I know that US Naval air engaged Vichy French air at the same time, but I am not sure if they were attempting to attack US Naval units.) I will not say this is the longest distance hit recorded, but it certainly ranks up there.
Aside from Glorious' aircraft, including her escorts, there were no major threats to the Scahrnhorst and Gneisenau, in that unique action.
F is for FIRE, That burns down the whole town!
U is for URANIUM... BOMBS!
N is for NO SURVIVORS...
- Plankton
LSM