home *** CD-ROM | disk | FTP | other *** search
INI File | 1997-06-12 | 2.7 KB | 97 lines |
- [OPTIONS]
- ; Year1a.cc1 written by Kent Briggs
- ; n00 = year (user setting)
- ; n01 = month (loop 1 to 12)
- ; n02 = x (upper left corner of box)
- ; n03 = y (upper left corner of box)
- ; n04 = DoW for 1st day of month
- ; n05 = Last day in month
- ; n06 = DoW loop 1 to 7
- ; n07 = x1 (various offsets from x)
- ; n08 =y1 (various offsets from y)
- ; n09 =x2 (lower right box corner)
- ; n10 =y2 (lower right box corner)
- ; n11 = line color (user option)
- ; n12 = text color (user option)
- ; n13 = shadow color (user option)
- ; t00 = typeface (user option)
- ; t01 = month name & dow letter
- ; t02 = title (user option)
- ; t03 = footnote (user option)
- Orientation(Portrait)
- Option(t02,Text [t],"Title","Yearly Planner")
- Option(t03,Text [t],"Footnote","Printed by Calendar Commander")
- Option(t00,Typeface [t],"Typeface","Times New Roman")
- Option(n11,Color [n],"Line color",$000000)
- Option(n13,Color [n],"Shadow color",$808080)
- Option(n12,Color [n],"Text color",$000000)
- [COMMANDS]
- ; draw year
- DateNum(n00,Year)
- Font(t00,5,n12,0,0,0,0)
- Text(50,3,1,n00)
- ; draw title
- Font(t00,3.5,n12,0,1,0,0)
- Text(50,8,1,t02)
- ; draw footnote
- Font(t00,2,n12,0,0,0,0)
- Text(50,98,7,t03)
- ; initialize month, x, y
- NumVar(n01,set equal to,1)
- NumVar(n02,set equal to,12.5)
- NumVar(n03,set equal to,13)
- ; loop month 1 to 12
- Block(While,n01,<=,12)
- ; draw box shadow
- NumVar(n07,set equal to,n02)
- NumVar(n08,set equal to,n03)
- NumVar(n07,increment by,1)
- NumVar(n08,increment by,1)
- NumVar(n09,set equal to,n07)
- NumVar(n10,set equal to,n08)
- NumVar(n09,increment by,30)
- NumVar(n10,increment by,11)
- Brush(n13,0)
- Rectangle(n07,n08,n09,n10,0)
- ; draw calendar box
- NumVar(n09,decrement by,1)
- NumVar(n10,decrement by,1)
- Brush($FFFFFF,0)
- Pen(n11,2,0)
- Rectangle(n02,n03,n09,n10,1)
- ; draw month name
- DateText(t01,Month,Full,Capitalized,n01)
- NumVar(n07,set equal to,n02)
- NumVar(n08,set equal to,n03)
- NumVar(n07,increment by,15)
- NumVar(n08,increment by,1.5)
- Font(t00,1.8,n12,0,0,0,0)
- Brush($FFFFFF,1)
- Text(n07,n08,4,t01)
- ; draw day of week letters
- NumVar(n07,decrement by,12)
- NumVar(n08,increment by,1.75)
- NumVar(n06,set equal to,1)
- Font(t00,1.2,n12,0,0,0,0)
- Block(While,n06,<=,7)
- DateText(t01,Day of week,1-letter,Capitalized,n06)
- Text(n07,n08,4,t01)
- NumVar(n06,increment by,1)
- NumVar(n07,increment by,4)
- EndBlock
- ; draw month number grid
- WeekDay(n04,n00,n01,1)
- LastDay(n05,n00,n01)
- NumVar(n07,decrement by,28)
- NumVar(n08,increment by,1.25)
- NumGrid(n07,n08,4,1.05,7,n04,1,n05,4)
- ; advance month and y value
- NumVar(n01,increment by,1)
- NumVar(n02,increment by,45)
- ; next row when x>90
- Block(If,n02,>,90)
- NumVar(n02,set equal to,12.5)
- NumVar(n03,increment by,14)
- EndBlock
- EndBlock
-