IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#57458 - 03/24/20 02:06 PM How to print Standard Variable value
Thomas Lepkowski Offline
OL Newbie

Registered: 04/26/18
Posts: 5
Hi,

I have a script that loops to print duplicate pages:

define(&i, integer, 0)

% Print the pages.
for(&i, 1, 1, 20)
$Page1a
showpage()
endfor()

How can I print the %i standard variable on that page in question as it loops? So I can see the copy count.

Thanks,

Thomas

Top
#57459 - 03/24/20 02:08 PM Re: How to print Standard Variable value [Re: Thomas Lepkowski]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
You need to define %i as a global variable and not a local one. This way, when you'll call it, it will have the value just before calling the page.

Be careful how you handle global variables as they can be access/modified anywhere.
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top
#57460 - 03/25/20 11:19 AM Re: How to print Standard Variable value [Re: Thomas Lepkowski]
Thomas Lepkowski Offline
OL Newbie

Registered: 04/26/18
Posts: 5
Thank you,

This works, is this correct?

define(&loop1, integer, 1)
% Print the pages.
for(&loop1, 1, 1, &copies1)
execpage('Page1a')
showpage()
&printloop1 := &printloop1 + 1
endfor()

&printloop1 := 1

I also setup a &copies1 global variable so I could test only 1 page for positioning.

Thanks again!

Top
#57461 - 03/25/20 03:50 PM Re: How to print Standard Variable value [Re: Thomas Lepkowski]
Jean-Cédric Offline
OL Expert

Registered: 10/03/16
Posts: 681
Loc: Québec, Canada
That seems correct.
_________________________
♪♫♪♫
99 frigging bugs in my code
99 frigging bugs
Take one down
Code around
127 frigging bugs in my code
♪♫♪♫

Top