home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / grafica / redfix / rexx / autofx / savebufferas_newicon.ifx.pre < prev    next >
Text File  |  1999-09-03  |  1KB  |  48 lines

  1. /*
  2.  * $VER: SaveBufferAs_NewIcon.ifx.pre (AutoFX Arexx script) 1.0 (03.09.99) ® 1999 by Przemyslaw 'SENSEI' Gruchala
  3.  *
  4.  * Arexx script for AutoFX. Made for the REDFiX modules package.
  5.  *
  6.  * Based on the SaveBufferAs_ILBM.ifx.pre written by Thomas Krehbiel
  7.  *
  8.  * Save main buffer as NewIcon. Buffer must be CMAP!
  9.  *
  10.  * Inputs:
  11.  *    Word(Arg(1),1) = Sequence number (?)
  12.  *    Word(Arg(1),2) = Total number of frames (N)
  13.  *
  14.  * Returns:
  15.  *    0 if successful, non-zero on failure
  16.  *
  17.  */
  18.  
  19. OPTIONS RESULTS
  20.  
  21. base = 'Autofx_SaveBufferAsNewIcon_'
  22. seq  = WORD(ARG(1),1)
  23.  
  24. lastpath = GETCLIP(base||'Path'||seq)
  25. lastext  = GETCLIP(base||'Ext'||seq)
  26.  
  27. IF lastpath = "" THEN DO
  28.    GetPrefs SavePath
  29.    lastpath = result
  30.    END
  31.  
  32. Gadget.1 = 'STRING  120  5 200 14 "Output Path:" "'lastpath'"'
  33. Gadget.2 = 'FILEREQ 321  5  20 14 "Output Path:" "'lastpath'" AT=1 DIRONLY'
  34. Gadget.3 = 'STRING  120 20 200 14 "New Extension:" "'lastext'"'
  35. Gadget.4 = 'TEXT    120 35   1  1 "(** = current frame number)" 1'
  36. Gadget.5 = 'END'
  37.  
  38. NewComplexRequest '"Save Buffer As NewIcon"' Gadget 360 56
  39. IF rc ~= 0 THEN EXIT rc
  40.  
  41. CALL SETCLIP(base||'Path'||seq, result.1)
  42. CALL SETCLIP(base||'Ext'||seq,  result.3)
  43.  
  44. /* Wymuszamy pojawienie sie GUI za pierwszym razem. */
  45. CALL SETCLIP(base||'GUI'||seq,  "SHOWGUI")
  46.  
  47. EXIT
  48.