home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / turbopgl.sit / Flash.p < prev    next >
Encoding:
Text File  |  1988-03-04  |  1.3 KB  |  50 lines  |  [TEXT/TPAS]

  1. program flash;
  2. {$R-}
  3. {$U-}     { turbo must be told not to include unnecessary units }
  4. {$D PasXCMD} { turbo must also be told to make an XCMD  }
  5. (*
  6.    flash -- a sample HyperCard external command.
  7.    ⌐Apple Computer, Inc. 1987
  8.    All Rights Reserved.
  9.  
  10.      Modified for Turbo Pascal by Brian Liebowitz
  11.  
  12.     You must install the DHDR resources called PasXFCN and PasXCMD 
  13.     into your copy of Turbo before compiling this XCMD.  You must also 
  14.      have compiled the unit HyperXCMD and moved it into the Turbo progam,
  15.       and the file XCMDGlue.inc must be accessible.  After compiling,use
  16.      ResEdit to change the ID from 300, and to copy the XCMD or XFCN into 
  17.     your stack or Hypercard.
  18.  
  19. *)
  20.  
  21.  
  22. USES MemTypes, QuickDraw, HyperXCmd;
  23.  
  24.  
  25. PROCEDURE PasXCMD(paramPtr: XCmdPtr);
  26.   
  27. VAR flashCount: LongInt;   
  28.              i: INTEGER;
  29.             port: GrafPtr;
  30.              str: Str255;
  31.  
  32.     {$I XCmdGlue.inc }
  33.  
  34. BEGIN
  35.        ZeroToPas(paramPtr^.params[1]^,str);   { first param is flash count }
  36.        flashCount := StrToNum(str);
  37.        GetPort(port);
  38.        FOR i := 1 TO flashCount DO 
  39.         BEGIN
  40.                 InvertRect(port^.portRect);
  41.                 InvertRect(port^.portRect);
  42.           END;
  43. END;
  44.  
  45. BEGIN
  46. END.
  47.  
  48. (*Remember to change the ID of this resource from 300*)
  49.  
  50.