home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Emulation / ZXAMSpectrum / ZXAM_Rexx / English / SaveSCR.zxam < prev    next >
Text File  |  1995-07-31  |  701b  |  29 lines

  1. /* this script saves the Spectrum's raw screen to a file */
  2.     
  3.     /* test if emulator is present */
  4.     address command
  5.     
  6.     if ~show(ports,ZXAM_REXX) then do
  7.         requestchoice 'title "ZXAM Script error..." body "I can''t find the emulator''s port!!" gadgets "AARGH!"'
  8.         exit
  9.         end
  10.  
  11.     /* SAVE requester */
  12.     oldpath=zxamactsavepath()
  13.     oldpattern=zxamactpattern()
  14.     zxampattern('#?.scr')
  15.     nombre=zxamsaverequester('Name for the SCR file...')
  16.     zxamsavepath(oldpath)
  17.     zxampattern(oldpattern)
  18.     if nombre='' then exit 0    /* CANCEL */
  19.     
  20.     /* open file */
  21.     if ~open('fichero',nombre,'W') then exit 0
  22.     
  23.     /* write the 6912 bytes of screen */
  24.     dummy=writech('fichero',zxamgetmem(16384,6912))
  25.     
  26.     dummy=close('fichero')
  27.     
  28.     exit
  29.