CDSendPlotToBitBucket.cm
Copyright © 1985 by Xerox Corporation. All rights reserved.
Jacobi, December 19, 1985 6:21:13 pm PST
Jacobi, December 19, 1985 7:35:10 pm PST
-- this commandfile waits until a ChipNDale pd-plot finishes
-- and then sends the bits to BitBucket (A c400 thermal plotter in CSL)
--
-- this commandfile sure is dirty; it will not be maintained...
--
← &plotterName ← "BitBucket"
--
← &header ← Rope.Cat["Chat ", &plotterName]
-- the next line makes sure that the device is not already chatted to, so
-- when it opens a viewer, this is the only viewer
← IF ViewerOps.FindViewer[&header]#NIL THEN ERROR ELSE TRUE
stpserver start
-- wait until plot finished (or no plot is pending)
CDWaitPlotFinished
chat BitBucket
-- wait 20 seconds and hope the chat viewer is opend and the connection done
sleep 20
← &cv ← ViewerOps.FindViewer[&header]
← TypeScript.TypeIn[&cv, "print\n"]
sleep 1
← &machine ← PupDefs.GetMyName[]
← &fileName ← Rope.Cat["/", &machine, "/cedar/temp/plot1.pd\n"];
← TypeScript.TypeIn[&cv, &fileName]
-- that's it; don't forget to check the chat viewer for errors next morning...