Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Escape! V3.0 - <b>hpstartmacro()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
hpStartMacro()

Begin a macro definition


Syntax

hpStartMacro(<nId>)


Parameters

<nId>
The ID number of the macro.


Returns

0
Successful.

-12
Wrong number of parameters passed.


Remarks

To create a printer macro, you would begin the macro definition by
calling hpStartMacro().  hpStartMacro() marks the macro as temporary
and assigns <nId> as its identifier.  All subsequent data is read and
stored as the definition of this macro until a stop macro definition or a
reset is received.  Stop macro definitions can be sent by using
hpEndMacro().

Note: Do not use any functions with a macro that would reset the printer,
i.e. hpConfig(), hpReset(), or hp Setup().


Support By

All HP Laser Printers except the original HP Laserjet


Example

hpPrintOn()
hpConfig()
hpSetFont()
hpStartMacro(1)
****
* define macro to simulate green bar paper with
* gray bars
****
lGray = .F.
FOR X = 0 TO 60 STEP 3
  FOR Y = 0 TO 2
    IF lGray
        hpGrayBar(x+y, 0, 80, 0, 10)
    ENDIF
  NEXT
  lGray = (.NOT. lGray)
NEXT
hpEndMacro(1)
hpOverlay(1)  // enable auto macro overlay.
.
.           // print routine with macro overlay on each page
.
hpReset()
hpOverOff()
hpClrMacros()  // delete all macros from memory
hpPrintOff()

See Also: hpEndMacro() hpExecMacro() hpClrMacros() hpCallMacro() hpOverlay() hpOverOff()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson