ExpertPrint.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Christophe Cuenod July 14, 1989 10:24:42 am PDT
Wait for some files to be modified, then transform it and print it.
DIRECTORY
Commander USING [Handle], CommandTool USING [DoCommand],
FSBackdoor USING [CreateEvent, NextCreateEvent], ProcessProps USING [GetProp],
Rope USING [Cat, Match, ROPE];
ExpertPrint: CEDAR PROGRAM
IMPORTS CommandTool, FSBackdoor, ProcessProps, Rope
~ BEGIN
ExpertPrint: PROC [] ~ {
ExpertPrint: Commander.CommandProc ~ {
cmd: Commander.Handle ← NARROW[ProcessProps.GetProp[$CommanderHandle]];
event: REF READONLY FSBackdoor.CreateEvent ← NIL;
DO
event ← FSBackdoor.NextCreateEvent[event];
IF Rope.Match[pattern: "[]<>Temp>IP>Print1!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint1.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print2!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint2.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print3!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint3.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print4!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint4.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print5!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint5.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print6!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint6.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print7!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint7.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print8!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint8.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print9!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint9.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print10!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint10.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print11!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint11.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print12!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint12.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print13!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint13.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print14!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint14.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print15!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint15.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print16!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint16.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print17!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint17.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print18!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint18.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print19!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint19.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print20!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint20.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print21!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint21.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print22!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint22.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print23!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint23.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print24!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint24.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print25!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint25.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print26!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint26.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print27!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint27.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print28!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint28.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print29!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint29.cm ",event.fName], cmd];
IF Rope.Match[pattern: "[]<>Temp>IP>Print30!*", object: event.fName, case: FALSE] THEN
[] ← CommandTool.DoCommand[Rope.Cat["ExpertPrint30.cm ",event.fName], cmd];
ENDLOOP;
};
ExpertPrint[];
Commander.Register[key: "ExpertPrint", proc: ExpertPrint, doc: "Print files sent by Expert System"];
END.