home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 May / CHIPCD5_98.iso / coreldrw / Scripts / header.csc < prev    next >
Text File  |  1997-05-23  |  960b  |  36 lines

  1. REM Creates Header in current script
  2. REM Copyright 1996 Corel Corporation. All rights reserved.
  3.  
  4. ' Defines
  5. #define IDOK  1
  6. #define IDCANCEL  2
  7.  
  8. '  Adds Specified header info
  9. sub WriteHeader(Name as string, Desc as string)
  10.     DIM DateStamp AS DATE
  11.     DateStamp=CDAT(Fix(GetCurrDate()))
  12.     withobject "CorelScript.automation.7"
  13.         .GotoLine 1
  14.         .AddLineBefore "' " + Desc
  15.         .AddLineBefore "' " + Name + "  for v7.0, made " + str(DateStamp) 
  16.     end withobject
  17. end sub
  18.  
  19. '####################################################################
  20. ' Main section
  21. DIM Name AS STRING
  22. DIM Desc AS STRING
  23. BEGIN DIALOG Header 199, 92, "Header Maker" ' Ask for header name and description
  24.     TEXT  5, 5, 105, 10, "Script Name"
  25.     TEXTBOX  5, 15, 190, 15, Name$
  26.     TEXT  5, 35, 75, 10, "Description"
  27.     TEXTBOX  5, 45, 190, 15, Desc$
  28.     OKBUTTON  50, 70, 40, 14
  29.     CANCELBUTTON  110, 70, 40, 14
  30. END DIALOG
  31. if (dialog(Header)=IDOK) then WriteHeader Name$, Desc$
  32.  
  33.  
  34.  
  35.  
  36.