The first point is to understand about the autobaud feature of a Hayes-compatible modem. The second is to read the product manual thoroughly.
For the first point, when in default autobaud mode, the modem detects the peer's speed when receiving the character sequence A T. To work for autobaud, the characters must be preceeded, separated and succeeded by some delay, just the same as when you type it at Hyperterminal. Think about it and you'll hopefully understand, why your previously used method can't work.
Regarding manuals, there's also an option to disable autobaud and store the setting permanently. You should also consider the case, that the modem may have been set to a different fixed baudrate before.