Software in the FCCs on the B737 and B757 prevent Autopilot mode engagement for takeoff. Yes Hdg Sel and other modes can be selected on the gnd, but they are not available once the A/P is put into Takeoff mode (TOGA). The modes are inhibited until 400ft AGL.
Go ahead try it, it can't be done.