WPC<  
                 0   (     	B           (          *     	  ?+       4        X<   	      9   	       9     "   9   U   @   9   U      :  	%      ):      /   /:  "   {   ^:   U   <   :   U   .   ;  #     C;   	      R<        d<   !   `   t<  	)      <                                                                                                                      (                    $                         d  v  A                                                                r                                                                 r                                                                                                                                      M a i n C o a c h                                               P                                                                 $                                                                 N                                                                  4                                                                      "                                                            F     !                                                                 $                                                                 #                                                                 &                                                            D     (                                                            0     '                                                            0     %                                                            D     *                                                            l	     )                                                            l	    P o s i t i o n                                                 |	     -                                                            J
     /                                                            ,     .                                                            ,     ,                                                            2     +                                                            t    S e t M a r g i n s                                                  2                                                            b     5                                                            	     4                                                                 3                                                            	     7                                                            	*     6                                                            	     9                                                            	P     8                                                            	T     :                                                            	h     ;                                                                 =                                                            	.     <                                                            	z     >                                                            	     ?                                                                 A                                                            	     @                                                            	X     B                                                            	     C                                                            	     F                                                                 H                                                                 J                                                                 L                                                                 K                                                                 I                                                                 G                                                                 E                                                                 1                                                                 0                                                            *     N                                                                 M                                                                 Q                                                                 R                                                                 S                                                            #     V                                                            	     U                                                            J     T                                                            	0"     X                                                            	     W                                                            	     Z                                                            	     Y                                                            	     \                                                            	.      [                                                            	      ^                                                            	`      ]                                                            	L      `                                                            	      _                                                            	~      a                                                            	      b                                                            	      c                                                            	      d                                                            	!     e                                                            	&!     f                                                            	0"     g                                                            	,!     h                                                            l!     k                                                            "     j                                                            "     P                                                            #     O                                                            ,#     l                                                            z#     m                                                            -     p                                                            	*     o                                                            &     n                                                            	-     q                                                            	*     r                                                            	-    F o r m a t M a r g i n s                                       .     t                                                            P.     u                                                            \9     x                                                            	"5     w                                                            d1     v                                                            	H9     y                                                            	"5     z                                                            	H9    F i l t e r i n g                                               l9     }                                                            ;                                                                 ;                                                                 :                                                                 :                                                                 p;                                                                 p;     ~                                                            ;     |                                                            ;                                                                 H<                                                                 H<                                                                 <                                                                 <                                                                 =                                                                 =                                                                 =                                                                 =    E r r o r                                                       =                                                                    >      M e s s a g e                                                                	*@                                                                 F?                                                                 	]                                                                 	|A                                                                 	N@                                                                 	G                                                                 	A                                                                 	I                                                                 	H                                                                 	K                                                                 	4I                                                                 	L                                                                 	:K                                                                 	M                                                                 	L                                                                 	N                                                                 	M                                                                 	fP                                                                 	N                                                                 	R                                                                 	P                                                                 	[                                                                 	R                                                                 	[                                                                 	]                                                                    ]           M e s s a g e                                                   >                                                                                                        5      E      "H      L                  C       @            $            aC      aI     *       <      _      f            
       
               y            	      ?	       C	      
'W	       [	      
'r	        	      '	       	      
      4
      O
      "                              
      
      0
      J
      M
      }
      -
      
      
            w      -}      W      ,E            '      3      4E      'R             -            ,z              !      	"      	%      	'      q'      7'       '      	(       *(      	)      *      J*      J*    3 *      	7+      } +      	 +      +      +      	,      :{/      1      	1      1      33      33      4      '%4      4       4      5      65      06      Z6      l6      r6      46      :7       =7      j7      ~7      a8      a8    %8      9      ,#9      79       9      } :      :      :      } :      	:      	R;      } :      	;      } :      	<      } :      	l<      } :      	<      } :      ;7=      	L=      } :      ;=      	=      } :      ;<>      	Q>      } :      7>      } >      	 >      ?      ?      	?      } ?      F@      a@      4@       @      7B       B      F      } F      	G      :8N      } wN      CV      	MV      -W      gX      7X       X      N]      } U]      	}]      :d      } d      l      	l      -m      n      Mo      'o      `o       co      o       o       o       o      p      0q       3q       Gq       Kq      )r      r      r      r      s      s      t      +u      } .u       Cu      } Gu      u      Fu       v      Fv      :v      Xv       v      Fv      v      -v      w      Ix      -x      )z      	Jz      	kz      	6{      	|      	      	      	T      	      	~      	e      	2      	      :.            	            /  P      E  |              C  c    *  <  _          y    	  ?	  	  
  *
  4
  O
  ~
  
  "  G              
  
  0
  J
  }
  
  
  
  
        _  w  }  W        E  X          3  E        y            +          a  0       z         !  O!  h!  !  "  V#  $  %  '  '  '  	(  *(  (  )  *  *  *  +  +  +  +  ,  -  -  ;.  {/  v0  1  1  1  02  33  f3  4  4  5  R5  5  5  06  Z6  l6  r6  6  :7  j7  ~7  8  8  #9  J9  j9  9  9  y:  :  :  :  1;  R;  ;  <  l<  <  7=  L=  =  =  <>  Q>  >  >  ?  >?  j?  ?  ?  @  F@  a@  @  B  B  B  (C  C  C  CD  D  E  E  eF  F  G  nG  K  L  M  8N  eN  XS  *T  T  U  CV  MV  W  gX  X  X  X  ,Y  Y  %Z  xZ  Z  y[  \  \  N]  }]  ]  ab  3c   d  d  d  i  j  nk  .l  l  l  m  n  o  'o  `o  o  Up  p  p  p  0q  q  )r  r  r  r  =s  ms  s  s  s  Qt  t  +u  u  v  :v  Xv  v  v  v  w  )x  Ix  Zx  x  x  z  Jz  kz  z  6{  y{  |  Q|    n    !  T        ~    e  r  2  ~      .    4      @  BL a b e l   ( m e n u 1 )    
               <   9 p` + ( C o u r i e r - W P     T y p e   1     < 
  9 p` (      X< 6X  9  ` +   C o u r i e r         "[  ? x x x  X    Xx  0 n  A p`  $ H e l v e - W P     T y p e   1     < 6X  9  ` +   C o u r i e r          A p p l e   L a s e r W r i t e r   I I f   '3   pet   	 ^-(4  APLW2F.PRS   hhhhhhhh PUBD/DOC1                                                                                                                                          H    lSJHD    **  #| x   	      " B D O ??=K ' 	             
    !    W       `	               //*********************************************////     NAME:      WPCH_MR0.WPM    	 @   //     PURPOSE:     CoachonMargins   	 X    // //*********************************************  //RevisionHistory//// 	 %
    
 	 %
    
 Global(ScrnMode;MsgAdj;DefTitle;CancelMsg)Global(w;h;tbox;hbox;helpmsg)Global(FakeBtns;HotElement;SaveScrn)select[0]=0DefTitle="Coach"     //Main"Coach"name   	 `	   ScrnMode=?ScreenHigh24Use("wpchlibr.wpm")         h           //Sharedlibraryfile   	 h   If(NotExists(Module))     ScreenSetup()     ColorScheme()EndifIf(?BlockActive)     BlockoffEndifOnCancelCall(CancelCoach)Error(off!)MsgAdj=DlgMessage()CancelMsg=0//***********************************************************	   	  p   //*********************************************//   	 (
    //    `	 MAINPROGRAM:Coach   	 
   //   	 X   //*********************************************   	     %
 	   
 LABEL(MainCoach)WindowMaximize   	 x   Cancel(Off!)   	 @   TopMar=?MarginTop   	 0
   BotMar=?MarginBottom   	    RightMar=?MarginRight   	 `	   LeftMar=?MarginLeft   	 (

   //Call(OpeningScreen)    (<   //OpeningScreen/MainMenu   	    Call(Position)         x2   //Ifyouneedusertopositioncursor   	    Call(SetMargins)   	 H
   Displayrewrite   	 p   0    `	       If((?MarginTop<>TopMar)or(?MarginBottom<>BotMar)or   	     (?MarginLeft<>Leftmar)or   	 h   (?MarginRight<>RightMar))    0 `	 `	       `	 Success=1Else   	         `	 Success=0Endif   	 P   If(Success=1)   	 @       `	 Message(&tbox;1001)         p     h4   //Correctcodeinsertedindocument   	         `	 Result=MessageBox("Coach";&tbox;1)ELSE   	 !8       `	 Message(&tbox;1002)         p     $   //Correctcodenotinsertedindocument,tryagain?   	 `"         `	 Result=MessageBox("Coach";&tbox;4)    `	      If(Result=1)              0K   //Ifnotyes   	 #"       `	           CancelCoach()    `	      ElseIf(Result=1)    `	           Go(MainCoach)    `	 Endif     Endif   	 '&   Endif   	 'x'   If(Exists(Module))   	 (@(       `	 If(Module=1)    `	      RETURN    `	 EndifEndif   	 +`",   QuitCoach()   	 `	      //*********************************************   	 (
    //*********************************************	   	 
   //*********************************************   	 `	      //   	 (
    //    `	 SUBROUTINE:OpeningScreen   	 
   //   	 X   //*********************************************   	     //Label(OpeningScreen)   	 H
   Message(&tbox;1100)   	    Result=Welcome("Coach";&tbox)   	 x       `	 If(Result=1)    F   //UserchoseQuit   	 @       `	      QuitCoach()    `	 EndifReturn   	    	   	 (

   //*****************************************************     	 `	         	 `	          	 `	      ******   	 (
    //   	 
   //    `	 PLACECURSORWHEREYOUWANTIT...   	 X   //   	     //*****************************************************     	 H
      	 H
       	 H
   *******   	    Label(Position)   	 x       `	 Message(&tbox;1205)     //PlacecursoratXXX   	 h	   position   	 0
       `	 Message(&hbox;5000)    `	 FakeIt("Coach";&tbox;5;1;0)    `	 Repeat    `	 keypress={8154;}          //F7key   	        `	 chkcode={1;}   	 H
       `	 Key=DoEdit(1;&chkcode;&keypress)               x    	 p        	 p      	 p    //WaitforusertoF7   	 8       `	 If(key=8158orKey=3)     //Hintchosen   	         `	 Result=Hint(&hbox;99;99;3)   	 h       `	 Endif    `	 Until(Key=1ORKey=8154)    p         	 X       `	 WindowMaximizeRETURN   	 P   //*****************************************************     	 x      	 x       	 x   ************	   	 @   //*****************************************************     	 `	         	 `	          	 `	      ************   	 (
    //   	 
   //    `	 MENUCONTROL   	 X   //   	     //*****************************************************     	 H
      	 H
       	 H
   *************   	    Label(SetMargins)   	 x   //************SetValidMenuOptionVariables   	 h	       `	 hbox1={     "Choose>  r [BoldOn]?
   
 Layout.";   	 0
       `	           }    `	 hbox2={     "Choose>  r [BoldOn]?
   
 Margins.";   	 `	       `	           }    `	 hbox3={     1;   	 P
       `	           }    `	 LayoutMenu(&valid)    `	 allow=     {    h      1554;}    p //[Margins]*Menu   	 H
   orSubmenuitem   	 p       `	 exallow=     {    h 0;}     //Executethatitem   	 8       `	 accel=     {    h      109;}    p //Mformargins   	     acceleratorformenu   	 h       `	 exaccel=     {    h 0;}     //Executethatitem   	 0   //****************************************Ifnosubmenu   	         `	 NoSubMenu(&subval;&subacl;&exsubacl;&subs)//******************************************   	 P       `	 funkey={         h 8141;}     //ShiftF8valid   	 x   funtionkey   	 @       `	 sbox={     "Choose>  r [BoldOn]?
   
 Margins.";      //Message   	  p       `	      "";    `	      }    `	 HelpMsg={"Choose>  r [BoldOn]?
   
 Margins";   	 #"       `	      "";    p    	 $X#       `	      }    `	 Altletter=537    h //AltLTheAlt+lettertoaccess   	 H&%   menubar   	 '&       `	 MenuLetter=108    h //LforLayoutThemenuLetter   	 'x'       `	 Message(&hbox;5000)              p      //hint   	 h) )   Repeat   	 *!+       `	 Message(&tbox;1210)     //ChooseLayout,Margins   	 +`",       `	 DisplayRewrite    `	 Result=PostIt("Coach";&tbox;45;13;0;2;0)    `	 MenuActive=0    `	 Show=HotSpot(0;0;62;0;altletter;&funkey;1)	   	 X   Switch(Show)         h               p      //Creating   	 `	      table   	 (
    //*****************************************   	 
   //    `	 UserchoosesShowMe   	 X   //******************************************   	         `	 CaseOf1:         h      //ShowMe   	 H
       `	 Result=Postit("Coach";&tbox;45;13;0;3;0)    x    	         	       	     //Coordinatesforinstructionbox   	 x   А    `	 ShowMenu("Coach";&sbox;1;6;3;9;0;0)         	 @        	 @      	 @    //coordinatesforhelp,menuover,menudown   	 h	   //*****************************************   	 `	   //    `	 UserchoosesLayout         p      //Menubaritem   	 (

   //******************************************   	 P
       `	 CaseOf1531:    h           //UserchoosesLayout   	    //*****************************************   	 H
   //    `	 UserpressesAlt+L   	 p   //******************************************   	 8       `	 CaseOf537:    h           //UserpressedAltL   	     Ѐ    `	      PullDownDlg   	 h       `	      While(?Dialog=1)   	 0       `	      Endwhile    `	      Type("l")    h           //menubarletter   	         `	      Result=Postit("Coach";&tbox;45;13;0;3;0)//****************************************************   	 x   //    `	 UserPressesShift+F8   	 @   //****************************************************   	         `	 CaseOf8141:    h               p                x    	  p        	  p      	  p        `	 //UserpressedAlt+F7    `	      DisplayRewrite    `	      DlgInput(on!)    `	      FormatDlg    h      //Opencorrectdlgandtabto   	 $X#   correctitem   	 % $       `	      While(?DialogControl<>67)    `	           TabKey    `	      Endwhile    `	      Call(FormatMargins)	   	 0* *   //*****************************************   	 `	      //    `	 UserpressesAlt=   	 (
    //******************************************   	 
       `	 CaseOf8085:    h               p            //User   	 X   pressedAlt+=   	         `	      Message(&sbox;123 %
     
  0)    `	      Result=PostIt("Coach";&tbox;45;13;0;3;0)    `	      0           MenuActive=MenuBarControl("Coach";&hbox1;   	 x   &sbox;1;6;MenuLetter;&funkey)    @     //*****************************************   	 0
   //    `	 NoChoice   	    //******************************************   	 `	       `	 DEFAULT:         h               p                x    	 (

        	 (

        `	           //Default    `	      0           MenuActive=MenuBarControl("Coach";&hbox1;   	    &sbox;1;6;MenuLetter;&funkey)             `	 ENDSwitchIf(MenuActive<>1)          //forintermediatedlgif   	     menuisused   	 h       `	 If(Show<>8141)     //UserdidnotpressShift+F8   	 0       `	      0           Result=MenuControl(&hbox1;&hbox2;&hbox3;   	 X   &valid;&allow;&exallow;&accel;   	     &exaccel;&subval;&subacl;&exsubacl;   	    &subs;&funkey)    P         `	           DisplayRewrite    `	           MenuActive=Result//Stepstomanuallybringupdialog,reducesscreen   	  p   displayproblems   	 !8       `	           If(Result=1554orResult=109)//user   	 `"     selectedCreateorC   	 (#!       `	               h If(?Dialog<>463)    `	               h      CancelMenus()    `	               h      CancelDialogs()    `	               h      DisplayRewrite    `	               h      FormatMarginsDlg    `	               h Endif    `	           EndIf    `	 EndifEndif   	 0* *   Until(MenuActive<>1)   	 *!+   //*****************************************************     	 +`",       	 +`",   ****   	 `	      If(?Dialog=405)   	 (
        `	 Call(FormatMargins)Endif	   	 X   //*****************************************************   	 `	      *****   	 (
    //   	 
   //    `	 DIALOGCONTROL#463MarginFormatDlg   	 X   //   	     //*****************************************************   	 H
   *****   	    Error(on!)   	 x   ONERRORCALL(Error)   	 @   Repeat   	 h	       `	 Message(&tbox;1215)    `	 Message(&hbox;5010)     //GeneralHint   	        `	 Result=Postit("Coach";&tbox;16;12;0;4;0)    `	 While(?Dialog=463)         p            //Graphics   	    Dialog   	        `	 LastControl=?DialogControl    `	 Call(Filtering)    `	 Switch(?DialogControl)    `	 Caseof0:         h      //OK   	         `	 Message(&tbox;1215)    `	 Caseof1826:    h           //LeftMargin   	 X       `	 Caseof1827:    h           //RightMargin   	         `	 Caseof1828:    h           //Topmargin   	        `	 Caseof1829:    h           //BottomMargin   	 P       `	 Caseof1830:    h           //LeftAdjust   	 @       `	      Continue    `	 Caseof1831:    h           //RightAdjust   	  p       `	      Continue    `	 Caseof1832:    h           //FirstLineIndent   	 `"         `	      Continue    `	 Caseof1846:    h           //ParagraphSpacing   	 #"       `	      While(?DialogControl<>0)    `	           Tabkey    `	      Endwhile    `	      Message(&tbox;1215)    `	      Result=Postit("Coach";&tbox;16;12;0;4;0)    `	 EndSwitch    `	      If(?DialogControl<>LastControl)    `	           Result=Postit("Coach";&tbox;16;12;0;4;0)    `	      Endif   	 +`",   Endwhile   	 `	      Until(?Dialog<>463)   	 
   //*****************************************************   	     ******   	 H
   	   	    //*****************************************************   	 `	      *****   	 (
    //   	 
   //    `	 DIALOGCONTROL#405Close   	 X   //   	     //*****************************************************   	 H
   *****   	    //Label(FormatMarginsClose)   	 x   Result=0     SaveScrn=0        	 @   While(?Dialog=405)          //405Dlg   	 h	       `	 x1={     46;         h //Close   	 0
       `	      }    `	 x2={     52;   	 `	       `	      }    `	 y1={     17;   	 P
       `	      }    `	 y2={     17;   	        `	      }    `	 hotkey={     8182;0     //Enter    p         `	      }    `	 hotpnt={     1;    h //RepaintthescreenwhenHotspots   	     chosen   	 h       `	      }    `	 helpmsg={     "Choose>  r [BoldOn]?
   
 Close.";   	 X       `	           "";    `	      }    `	 Message(&tbox;1235)     //MessagetoAppearinthis   	 P   Dlg   	 x       `	 Switch(?DialogControl)    `	      CaseOf0:    h //SittingonClose   	  p       `	           info={     0;         p //ControlID   	 !8       `	               h 405;         p //DialogID   	 `"         `	               h 0;          //don'tallowarrows   	 (#!       `	               h "Coach";     //title   	 #"       `	               h 47;          //xposforPostit   	 $X#       `	               h 8;          //yposforPostit   	 % $       `	               h 0;          //Hintbutton   	 H&%       `	               h "Coach";     //helpTitle   	 '&       `	               h 1;          //RestoreScreen   	 'x'       `	               h 0;          //Reserved   	 (@(       `	           }    `	           accel={     8182;    p      //Enterfor   	 0* *   Close   	 *!+       `	               h }   	 +`",       `	           aclpnt={1;         p //repaintscreen?   	 `	          `	               h }             	 (
        `	      0     Result=ButtonControl(&info;&x1;&x2;&y1;&y2;&hotkey;&hotpnt;&accel;   	     &aclpnt;&tbox;&helpmsg)    H
         `	      DEFAULT:    `	           info={     ?DialogControl;      //Control   	 @   ID   	 h	       `	               h 405;              p //DialogID   	 0
       `	               h 0;              p //don'tallowarrows   	        `	               h "Coach";         p //Title   	 `	       `	               h 47;              p //xposforPostit   	 (

       `	               h 8;              p //yposforPostit   	 P
       `	               h 0;              p //HintButton   	        `	               h "Coach";         p //HelpTitle   	        `	               h 1;              p //RestoreScreen   	 H
       `	               h 0;              p //Reserved   	 p       `	           }    `	           accel={     8182;    p      //2orMValid   	     Accelerators   	 h       `	               h }    `	           aclpnt={1;         p //repaintscreen?   	 X       `	               h }             	         `	           Allow={0;          //EnterforClose   	        `	               h }    `	      0     Result=InvalidControl(&info;&x1;&x2;&y1;&y2;&hotkey;&hotpnt;&accel;   	 @   &aclpnt;&tbox;&helpmsg;&allow)              `	 ENDSwitchEndwhile              h //405DlgClose   	 `"     //*****************************************************   	 (#!   ******   	 #"   RETURN	   	 $X#   //*****************************************************   	 `	      *****   	 (
    //   	 
   //    `	 DIALOGCONTROL#405ChooseMargins   	 X   //   	     //*****************************************************   	 H
   *****   	    Label(FormatMargins)   	 x   Result=0     SaveScrn=0        	 @   While(?Dialog=405)          //405Dlg   	 h	       `	 x1={     25;         h //HotspotCoordinatesforValid   	 0
   Items   	        `	      }    `	 x2={     38;   	 (

       `	      }    `	 y1={     9;   	        `	      }    `	 y2={     9;   	 H
       `	      }    `	 hotkey={     50;0    h //2forMarginsAcceleratorsfor   	 8   Hotspots      h h       `	      }    `	 hotpnt={     1;    h //RepaintthescreenwhenHotspots   	 0   chosen   	 X       `	      }    `	 helpmsg={     "Choose>  r [BoldOn]?
   
 Margins.";   	        `	           "";    `	      }    `	 Message(&tbox;1230)     //MessagetoAppearinthis   	 @   Dlg   	         `	 Switch(?DialogControl)    `	      CaseOf67:     //Sittingonmargins   	 `"         `	           info={     67;         p //ControlID   	 (#!       `	               h 405;         p //DialogID   	 #"       `	               h 0;          //don'tallowarrows   	 $X#       `	               h "Coach";     //title   	 % $       `	               h 47;          //xposforPostit   	 H&%       `	               h 8;          //yposforPostit   	 '&       `	               h 0;          //Hintbutton   	 'x'       `	               h "Coach";     //helpTitle   	 (@(       `	               h 1;          //RestoreScreen   	 h) )       `	               h 0;          //Reserved   	 0* *       `	           }    `	           accel={     50;109    p      //2orMValid   	 +`",   Accelerators   	 `	          `	               h }    `	           aclpnt={1;1;         p //repaintscreen?   	 
       `	               h }             	 X       `	      0     Result=ButtonControl(&info;&x1;&x2;&y1;&y2;&hotkey;&hotpnt;&accel;   	 H
   &aclpnt;&tbox;&helpmsg)             `	      DEFAULT:    `	           info={     ?DialogControl;      //Control   	 h	   ID   	 0
       `	               h 405;              p //DialogID   	        `	               h 0;              p //don'tallowarrows   	 `	       `	               h "Coach";         p //Title   	 (

       `	               h 47;              p //xposforPostit   	 P
       `	               h 8;              p //yposforPostit   	        `	               h 0;              p //HintButton   	        `	               h "Coach";         p //HelpTitle   	 H
       `	               h 1;              p //RestoreScreen   	 p       `	               h 0;              p //Reserved   	 8       `	           }    `	           accel={     50;109    p      //2orMValid   	 h   Accelerators   	 0       `	               h }    `	           aclpnt={1;1;         p //repaintscreen?   	         `	               h }             	        `	           Allow={67;         p //whichcontrolsto   	 P   allow   	 x       `	               h }    `	      0     Result=InvalidControl(&info;&x1;&x2;&y1;&y2;&hotkey;&hotpnt;&accel;   	  p   &aclpnt;&tbox;&helpmsg;&allow)    !8         `	 ENDSwitchEndwhile              h //405Dlg   	 $X#   //*****************************************************   	 % $   ******   	 H&%   RETURN	   	 '&   //*****************************************************   	 `	      *   	 (
    //   	 
   //    `	 SUBROUTINE:Filtering   	 X   //   	     //*****************************************************   	 H
   *   	    Label(Filtering)   	 x       `	 Look(Key)    `	 If(key=768)   	 h	       `	      If(?MouseLastY=yposS1)    p          =   //IfQuit   	 0
       `	           If(?MouseLastX>=xposQ1and?MouseLastX<=xposQ2)   	 `	       `	               h CancelMsg=0    `	               h CancelCoach()    `	               h key=0    `	           EndIf    `	     `	           If(?MouselastX>=xposH1and?MouseLastX<=xposH2)    =   //IfHint   	 8       `	               h Hint=Hint(&hbox;99;99;3)    x    	         `	               h Endif         p         	 h       `	           Endif    `	 EndIf    `	      If(key=8160)              3   //iftheypressEsc   	         `	           CancelMsg=0    `	           CancelCoach()    `	           key=0    `	      EndIf    `	     `	      If(Key=8158)    `4   //iftheypressF1   	  p       `	           Hint=Hint(&hbox;99;99;3)          x    	 !8       `	               `	      Endif    h              	 (#!       `	      If(?DialogControl>=1830and?DialogControl<=1846)   	 $X#       `	           If(ntoc(key)<0)    p //notacharacter   	 % $       `	               h Type(ntoc(Key))    `	           Endif    `	      Else    `	           Type(ntoc(Key))    `	      EndifRETURN	   	 *!+   //*****************************************************   	 `	      ******   	 (
    //   	 
   //    `	 SUBROUTINE:Error   	 X   //   	     //*****************************************************   	 H
   ******   	    LABEL(Error)   	 @       `	 Message(&tbox;1240)    `	 Beep    `	 Result=Postit("Coach";&tbox;16;12;0;4;0)    `	 Message(&tbox;1215)RETURN	   	 (

    
  P  //*****************************************************   ******   	 (
    //   	 
   //    `	 PROCEDURE:Message   	 X   //   	     //*****************************************************     	 H
       	 H
   *******   	    PROCEDUREMessage(&tbox;Msg)   	 x   Switch(Msg)   	 h	   Caseof1001:     //Coachsuccessful   	    tbox={     "Youhavechangedthemarginsinyour   	 `	   document.";   	 (

       `	 "";    `	 }Caseof1002:     //Coachnotsuccessful   	 H
   tbox={     "Somehowthemarginswerenotchanged.";   	 p       `	 "Wouldyouliketotryagain?";    `	 "";    `	 }Caseof1100:     //OpeningScreen   	 X   tbox={     ">  r [BoldOn]?
   
 Margins>   [BoldOff]?
   
 ";   	         `	 "";    `	 "Youcanchangethemarginsinyourdocument.";    `	 "";   X+ X  X
 XU^ Ԁ"

";   	 @   Ѐ"				";   	 %    Ѐ"				";   	 
!   Ѐ"				";   	 !   Ѐ"				";   	 "t    Ѐ"				";   	 #Y!   Ѐ"				";   	 $>"   Ѐ"				";   	 %##   Ѐ"				";   	 h&$   Ѐ"

";   	 M'%   Ѐ"";   	 2(&       `	 "";    `	 }Caseof1205:   	 o+"*      P      `	     
   
 tbox={    `	 "Placethecursorwhereyouwanttoinsertanew   	 L    margin.";    `	 "";    `	 }Caseof1210:   XX X{ X X+ tbox={     "Tochangethemargins,";   	 x        P      `	     
   
      `	 "";    `	 "Choose>  r [BoldOn]?
   
 Layout>   [BoldOff]?
   
 ,";   	 
J	       `	 "then>  r [BoldOn]?
   
 Margins>   [BoldOff]?
   
 ,";    `	 "or";    `	 "Press>  r [BoldOn]?
   
 Shift+F8>   [BoldOff]?
   
 .";   	 

       `	 "";    `	 }   X XX XX Caseof1215:     //GeneralMessage   	 q   tbox={    `	 "Chooseamarginandtypeameasurement.%
     
 ";    `	 ">   [BoldOff]?
   
 Choose>  r [BoldOn]?
   
 OK>   [BoldOff]?
   
 Ԁwhenfinished.";    `	 "";    `	 }   	   	 5   tbox Caseof1230:tbox={     "Choose>  r [BoldOn]?
   
 Margins.";   	 A       `	 "";    `	 }Caseof1235:     //Dlg405closing   	 a   tbox={     "Choose>  r [BoldOn]?
   
 Close.";   	 )        `	 "";    `	     `	 }Caseof1240:tbox={    `	 "Themarginsyouhavetypedoverlap.";    `	 "";    `	 "Tryagain.";    `	 }Caseof5000:         h      //Hints   	 'Q$-   hbox={     "Leftandrightmarginstakeeffectfrom   	 (%.   whereyou";    `	 "placethecursortoinsertthemargin.";    `	 "";    `	 "Topandbottommarginstakeeffectfromthecurrentpage.";    `	 "";    `	 }   	 .Y+6   Caseof5010:hbox={     "Amarginismeasuredfromtheedgeofthe   	      paper.Forexample,";    `	 "a2""leftmarginistheareafromtheleftedgeofthepaper";    `	 "to2""towardsthecenterofthepaper.";̀              "";̀"
";̀"		";̀"		";̀"	2""	";̀"		";̀"		";̀"		";̀"		";̀"		";   	 D/+8   Ѐ"		";̀"\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/";̀"";     }DEFAULT:         <           //Ifnonewerefound   	 8        tbox={    
 "Messagenotfound!"+msg;   	               4     
 "";         4 }     hbox={    
 "Nohintavailable.Whattypeofinformation";   	  $            4     
 "wouldbehelpfulhere?"+msg;         4     
 "";         4 }ENDSwitchENDPROC8    4     T$ * 44  //*****************************************************************    