This is my setup:
I want to use the 'x' output as a driver for the mesh line endpoint.
I think this answer outlines what I'm supposed to do, but I don't understand how I'm supposed to use scripts.
I don't want this question to be closed because the alternative solution that everyone is pointing me towards doesn't answer the question, it just provides a completely different way of achieving what I asked for.