Part of the Samples Website. 8/16/97.

samples.basicStuff.aldusBusinessCards

«Use PageMaker to create a custom business card from scratch
«requires PageMaker 5 install file, download from:
«GO USERLAND on CompuServe
«Keyword USERLAND on America On-Line
«UserLand Discussions under Third Parties on AppleLink
«written by Peter Dako, 8/9/93
«modernized by Dave Winer, 11/13/93
«locals that determine the information on the card, where the file is saved
local (name = user.name)
local (organization = user.organization)
local (address = "123 Main Rd.\rAnytown, AnyState\rAnywhere")
local (eightUp = true) «true if you want 8 on a page, false if you want just 1
local (logoFont = "Times")
local (addressFont = "Palatino")
local (nameFont = "Helvetica")
local (f = file.folderFromPath (PageMaker.appInfo.path) + "Business Card.pm")
PageMaker.launch () «be sure PageMaker is running
PageMaker.trace = true «watch commands in Frontier's main window
with PageMaker.command, PageMaker.query
new (1)
measureunits ("inches", "inches", 0)
box (1, 1, 4.5, 3.25)
fillStyle ("none")
view (150)
box (1, 1, 1.75, 3.25)
fillStyle ("solid")
newStory (1.9, 1.25)
font (nameFont)
size (14)
leading (16)
enterText (name + "\r" + organization)
selectLast ()
move ("left", 2.2)
resize ("right", 4, 0, 0)
selectLast ()
placenext (bottom)
«is all the Text visible, or is the Text Block stil loaded? If it doesn't fit, make it a bit smaller.
if getPMstate () equals 5
selectLast ()
textEdit ()
selectAllText ()
setWidth (70)
newStory (1.9, 1.85)
font (addressFont)
size (9)
leading (11)
enterText (address)
selectLast ()
move ("top", 2.5)
move ("left", 2.2)
resize ("right", 4, 0, 0)
oval (1.117, 1.155, 1.6, 1.62)
fillStyle ("paper")
bringToFront ()
newStory (1.25, 1.25)
font (logoFont)
size (24)
leading (28)
enterText (organization [1])
selectLast ()
move ("left", 1.25)
resize ("right", 1.65, 0, 0)
if eightUp
selectAll ()
copy ()
paste ()
move (left, 5)
move (top, 1)
selectAll ()
move (top, 0.75)
copy ()
multiplePaste (3, 0, 2.5)
selectAll ()
move ("left", 0.5)
view (100)
PageMaker.trace = false
view (75)
saveAs (f, 0, 0, 0)
deselect ()
view (100)
close (file.fileFromPath (f))
Finder.reveal (f)


This page was last built on Sat, Aug 16, 1997 at 6:32:21 PM. You can download the current set of sample scripts from our FTP site. Dave