/***************************************************************************/
/* Export.rexx   ©1995 Adrian Maggs   2:2500/179.8                         */
/*                                                                         */
/* $VER: Export.rexx 2.3 (12.6.95)                                         */
/*                                                                         */
/* Intended for use from the EXPORT button, will gate any internet email   */
/* or news postings automatically                                          */
/*                                                                         */
/* Change "spot_path" to suit your system, and make sure you have OUTBOUND */
/* assigned.                                                               */
/***************************************************************************/

options results

spot_path = 'COMMS:Spot/Spot'  /* Change this line ONLY */


if ~show('ports','SPOT') then do
  address command spot_path
  'WaitForPort SPOT'
  quit = yes                  /* Marker to close SPOT after finishing */
end

address 'SPOT'
'isiconified'
if rc = 0 then do
  icon = yes                  /* Marker to re-iconify after finishing */
  'uniconify'
end
'spot2front'

'export CLOSEWIN'            /* Export messages */

/* now call the amigate process, you might need to change your
 OUTBOUND path*/

if exists('Outbound:2.999.99.0.OUT') then do
    address command 'Amigate Amitcp:amigate/ >CON:0/0/800/200/gating.../AUTO/CLOSE/SCREENSPOT'
    end       

if icon = yes then do
  'iconify NOREQ'             /* Re-iconify if necessary */
end
if quit = yes then do
  'quitspot NOREQ'            /* Close SPOT if we had to open it ourselves */
end

exit
