The E4949 is SCPI (Standard Command Program Interface) so the instrument can be programmed using standard SCPI commands. Here are some.
Keysight has an online user guide which has the instrument commands for E4990 (very similar)
The manual has the SCPI command Reference but the example programs are in Microsoft VBA – however, the example programsshould be relatively easy to convert to HT BASIC.
You’ll need to know the GPIB Address of the instrument, lets say 717
OUTPUT 717;”*CLS” ! Instrument Clear Command
OUTPUT 717;”:SYST:PRES 1″ ! Instrument Power-On Preset