/* Eagleplayer control using Diropus4
   (c) 1992-97 DEFECT Softworks

   returns current module name

   ------------------------------------------------------------------------
   Call as:
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   [ARexx]  Eagleplayer2:Rexx/EP_GetModuleName.dopus {p}

   Flags:   none required
*/
parse arg opusport

options results

if pos('rexx_EP',SHOW('Ports')) = 0 then do
 address value opusport
 toptext 'Eagleplayerport not found!'
 exit 0
 end

address 'rexx_EP'
status g ply
aha = result
if aha="yes" then
  do
   status m fil
   name = result
   status m pnr
   num = result
   'status p 'num' nam'
   player = result
   address value opusport
   toptext 'Eagleplayer:  Player: '||player||'  Module: '||name
  end
 else
  do
   address value opusport
   toptext 'Eagleplayer: No Module playing!'
  end
exit
