Heat the butter in a skillet over medium heat. Stir in the onion; cook and stir until the onion has softened and turned translucent, about 5 minutes. Stir in flour and salt and cook, stirring constantly, for 2 minutes more.
Add milk and macaroni to saucepan, and bring to a boil. Reduce heat and cover. Simmer for 15 minutes or until pasta is tender, stirring occasionally.