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)
https://download.keysight.com/WN/E4990A_Help.pdf?authparam=1576019085_8ab59e023de0b14907d2da74e4f6e4a1
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