6.0
Table Of Contents
- PlanetPress Talk Basics
- PlanetPress Talk Editor
- Key Concepts
- Detailed Directions
- Enter a New Program in the Editor
- Import or Export a Program
- Save a Program
- Print a Program
- Exit the PlanetPress Talk Editor
- Show or Hide the Commands Area or Spy List
- Adjust the Sizes of the Commands Area, Code Area and Spy List
- Expand or Collapse Command Groups
- Enter Commands in the Editor
- Use Command and Variable Name Completion
- PlanetPress Talk Summary
- Variables
- Operators and Operator Functions
- Loop and Condition Structures
- Commands
- Add a Comment
- Work with Emulations
- Work with Data Pages
- Work with Database Records
- Select or Define a Data Value
- Execute Documents and Document Elements
- Work with PostScript
- Work with PPDs
- Save and Restore the Current Graphics State
- Work with Global Functions
- Define and Assign Values to Variables
- Work with Objects
- Work with Bar Codes
- Work with Images and Attachments
- Work with Text
- Work with Styles
- Work with Strings
- Work with Characters
- Work with Arrays and Color Arrays
- Draw
- Search
- Debug
- Language Reference
- Language Reference (Alphabetical)
- % (procedure)
- @ (function)
- @name (function/procedure)
- @page (procedure)
- $element (procedure)
- + (operator & function)
- - (operator)
- * (operator)
- / (operator)
- > (operator)
- >= (operator)
- < (operator)
- <= (operator)
- = (operator)
- := (operator)
- <> (operator)
- Add (function)
- And (Boolean operator function)
- Arc (procedure)
- ArcN (procedure)
- BeginParagraph … EndParagraph (procedure)
- BeginUTF8Paragraph … EndUTF8Paragraph (procedure)
- BitmapWidth/BitmapHeight (function)
- Breakpoint (procedure)
- C128 (function)
- CallPPD (procedure)
- Char (function)
- Ceil (function)
- ClearPage (procedure)
- ClosePath (procedure)
- Cos (function)
- CRLF (procedure)
- Current (system object)
- currentiteration (variable)
- CurToStr (function)
- CurveTo/RCurveTo (procedure)
- Date (function)
- Define (procedure)
- DefineData (procedure)
- DefineImageIndex (procedure)
- Directory
- Div (function)
- DoForm (procedure)
- &EOJob (system variable)
- EPSWidth/EPSHeight (function)
- Eq (function)
- ExecPage (procedure)
- Exit (procedure)
- Field (function)
- FieldCount (function)
- FieldName (function)
- Fill (procedure)
- Find (function)
- &FirstSide (system variable)
- FloatToInt (function)
- FloatToStr (function)
- For… EndFor (procedure)
- Function @name (procedure)
- GE (function)
- Get (function)
- GetBlack (function)
- GetCyan (function)
- GetMagenta (function)
- GetNextDataPage(procedure)
- GetYellow (function)
- GRestore (procedure)
- GSave (procedure)
- GT (function)
- &Height (system variable)
- If (function)
- If … ElseIf… EndIf (procedure)
- IntToFloat (function)
- IntToStr (function)
- InStream... EndInStream (procedure)
- IsNumber (function)
- IsPageEmpty (function)
- iterationcount (variable)
- LE (function)
- Left (function)
- Length (function)
- LineTo/RLineTo (procedure)
- LowerCase (function)
- LT (function)
- MapUTF8 (function)
- Margin (procedure)
- Mid (function)
- Mod (function & procedure)
- MoveTo/RMoveTo (procedure)
- Mul (function)
- NE (function)
- Neg (function)
- Not (Boolean operator function)
- Object $name()... EndObject (procedure)
- Or (Boolean operator function)
- Ord (function)
- OutputDebugString (procedure)
- PassThrough (procedure)
- PDFPageCount (function)
- PDFWidth/PDFHeight (function)
- Physical (system object)
- Pie (procedure)
- PixelHeight (function)
- PixelWidth (function)
- Pos (function)
- &PrinterMode (system variable)
- Put (procedure)
- Random (function)
- Rectangle (procedure)
- RectFill (procedure)
- RectFillStroke (procedure)
- RectStroke (procedure)
- Repeat... Until (procedure)
- ResourceType (function)
- Right (function)
- RunPS (procedure)
- Scale (procedure)
- Search … EndSearch (procedure)
- SelectMedia (procedure)
- Set (procedure)
- SetAngle (procedure)
- SetBodyText (procedure)
- SetDash(procedure)
- SetDataPage(procedure)
- SetEmailAddress (procedure)
- SetEmailSubject (procedure)
- SetEmulation(procedure)
- SetFaxInformation (procedure)
- SetFaxNumber (procedure)
- SetFillColor (procedure)
- SetStyle (procedure)
- SetStyleExt (procedure)
- SetImageIndex (procedure)
- SetLineWidth (procedure)
- SetLPP(procedure)
- SetPDFBookmark (procedure)
- SetStrokeColor (procedure)
- Show / ShowCenter / ShowRight (procedure)
- ShowBarCode (procedure)
- ShowBitmap (procedure)
- ShowEPS (procedure)
- ShowLeftRight (procedure)
- ShowPage (procedure)
- ShowPDF (procedure)
- ShowUTF8 (procedure)
- ShowUTF8Left / ShowUTF8Right / ShowUTF8Center (procedure)
- Sin (function)
- StopJob (procedure)
- Store (procedure)
- &Str (system variable)
- StringReplace (function)
- StringWidth (function)
- StringWidthUTF8 (function)
- Strip (function)
- Stroke (procedure)
- StrokeAndFill (procedure)
- StrToCur (function)
- StrToFloat (function)
- StrToInt (function)
- Sub (function)
- SubRecCount (function)
- System (system object)
- Time (function)
- Translate (procedure)
- Trim (function)
- TrimLeft (function)
- TrimRight (function)
- UpperCase (function)
- &Width (system variable)
- XOr (Boolean operator function)
- xmlCount()
- xmlGet()
- xmlResetRoot()
- xmlSetRoot()
- Language Reference (Alphabetical)
- Conversion Tables
- Index
Code Samples
23
Code Samples
This section presents short samples of PlanetPress Talk code that may be useful, and that may also
stimulate your imagination for the ways in which you can use PlanetPress Talk in your documents. Consult
the PlanetPress Talk Language Reference for help understanding specific commands.
Print a variable number of copies of a page based on a value in the datastream
This sample prints a variable number of copies of a page based on an integer value in the data stream. It
uses a global integer variable &nbPage that is initialized to 0, and subsequently set to the value of the data
that appears on line 1, columns 1 through 2 of the data page.
The document for which it was written uses two pages: DATA and RUNPAGE. DATA is an overlay page that
contains all of the data selections for the document. RUNPAGE is a runpage and the code that appears here
is in a PlanetPress Talk object on RUNPAGE.
Code
% ====================================================
% PRINT A VARIABLE NUMBER OF COPIES OF A PAGE BASED ON
% A VALUE IN THE DATA STREAM
% ====================================================
if(ne(&printermode,0))
set(&nbPage,strtoint(@(1,1,2)))
define(&it,integer,0)
for(&it,1,1,strtoint(@(1,1,2)))
execpage('DATA')
showpage()
endfor()
endif()
Notes
• The if (ne (&printermode,0)) statement prevents the program executing during design.
• The local variable &it is a counter.










