home *** CD-ROM | disk | FTP | other *** search
- -- background: 3583 from stack: in
- -- bmap block id: 3595
- -- flags: 4000
- -- background id: 0
- -- name: Weekly
- ----- HyperTalk script -----
- on extendWeekly
- global extendInProgress
- put true into extendInProgress
- answer "Extend until end of a six-month period?" with "OK" or "Cancel"
- if it is not "OK" then
- put false into extendInProgress
- exit to HyperCard
- end if
- put the userLevel into saveLevel
- set userLevel to 5
- push card
- set lockScreen to true
- doMenu "New Card"
- fillWeekly
- set lockScreen to true
- pop card
- if the number of card buttons > 0
- then
- choose button tool
- click at loc of card btn "Extend"
- doMenu "Clear Button"
- choose browse tool
- doMenu "Compact Stack"
- end if
- go last card of bkgnd
- set lockScreen to false
- set userLevel to saveLevel
- end extendWeekly
-
- on fillWeekly
- global oneDay,extendInProgress
- set lockMessages to true
- set cursor to 4
- put getStartDate() into start
- put thisHalfYear(start+190*oneDay) into myEnd
- get myEnd
- convert it to dateItems
- if item 7 of it > 2 and item 7 of it < 6 -- Tues thru Thu
- then subtract 7*oneDay from myEnd
- set lockScreen to false
- put weekNumber(start+3*oneDay) into startWeek
- if startWeek > 53 then put 1 into startweek
- put false into doneYet
- repeat while start < myEnd -- until begin of next 6-month period
- if doneYet then doMenu "New Card"
- put start into field "WeekSecs"
- get start + 3*oneDay
- convert it to dateItems
- put (item 1 of it) && dayMonthName(2,item 2 of it) into field "Month"
- if startWeek > 53 then put 1 into startweek
- put startWeek into field "WeekNumber"
- add 1 to startWeek
- repeat with index = 1 to 7
- get start
- convert it to dateItems
- put "WeekDay"&index into myDay
- put (item 3 of it) into field myDay
- add oneDay to start
- end repeat
- put true into doneYet
- end repeat
- set lockScreen to true
- go to last card of bkgnd "Weekly"
- doMenu "New Button"
- set name of btn (the number of card buttons) to "Extend"
- set rect of btn "Extend" to 351,238,431,255
- set script of card btn "Extend" to "on mouseUp"&return&"extend 1"&return&"end mouseUp"
- choose browse tool
- set lockScreen to false
- set lockMessages to true
- end fillWeekly
-
- function getStartDate
- global oneDay,extendInProgress
- put startOfWeek(the seconds) into thisWeek
- if thisWeek < 2587766400 then --before jan 1, 1986
- answer "Set the time to today's date."
- exit to HyperCard
- end if
- set lockScreen to true
- go to prev card
- get the short name of bkgnd
- go back
- set lockScreen to false
- if it is not "Weekly"
- then
- get startOfWeek(thisHalfYear(the seconds))
- else
- get oneDay*7 + field "WeekSecs" of prev card
- if it >= thisWeek then return it
- put it into myDate
- convert it to short date
- put thisWeek into dateWeek
- convert thisWeek to short date
- answer "Extend from which date?" with it or thisWeek or "Cancel"
- if it is "Cancel" or it is empty then
- put true into extendInProgress
- doMenu "Delete Card"
- go to prev card
- put false into extendInProgress
- exit to HyperCard
- end if
- if it is thisWeek then get dateWeek else get myDate
- end if
- return it
- end getStartDate
-
- function weekNumber start
- global oneDay
- get start
- convert it to dateItems
- put 1 into item 2 of it
- get thisHalfYear(it)
- convert it to dateItems
- if item 7 of it > 1 and item 7 of it < 6 then add 7*oneDay to start
- convert it to seconds
- return (start-startOfWeek(it)) div (oneDay*7)
- end weekNumber
-
- on doMenu menuItem
- global extendInProgress
- if extendInProgress is false and menuItem is "New Card"
- then extend 1
- else pass doMenu
- end doMenu
-
- on doPaintText
- doMenu "Background"
- set textHeight to 18
- set textSize to 18
- set textFont to "Times"
- set textAlign to "Right"
- put textHeight of field "WeekDay1"-3 into myOffset
- repeat with dayNum = 1 to 7
- put the rect of field ("WeekDay"&dayNum) into myR
- put item 1 of myR into myRLeft
- put item 2 of myR into myRTop
- choose select tool
- drag from myRLeft-42,myRTop to myRLeft,item 4 of myR
- doMenu "Clear Picture"
- choose text tool
- click at myRLeft-4,myRTop + myOffset
- type dayMonthName(3,1 + dayNum mod 7)
- doMenu "Select"
- doMenu "Transparent"
- end repeat
- doMenu "Background"
- choose browse tool
- end doPaintText
-
-
- -- part 12 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=32 top=77 right=149 bottom=223
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 14
- -- part name:
-
-
- -- part 14 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=32 top=166 right=238 bottom=223
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 14
- -- part name:
-
-
- -- part 15 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=31 top=255 right=327 bottom=222
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 14
- -- part name:
-
-
- -- part 45 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=284 top=77 right=149 bottom=475
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 14
- -- part name:
-
-
- -- part 17 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=284 top=166 right=238 bottom=475
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 14
- -- part name:
-
-
- -- part 18 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=289 top=255 right=327 bottom=380
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 14
- -- part name:
-
-
- -- part 80 (field)
- -- low flags: 00
- -- high flags: 4000
- -- rect: left=384 top=255 right=327 bottom=475
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 3
- -- text size: 12
- -- style flags: 0
- -- line height: 14
- -- part name:
-
-
- -- part 27 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=11 top=32 right=56 bottom=146
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: Month
-
-
- -- part 20 (field)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=186 top=32 right=56 bottom=209
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 24
- -- part name: WeekNumber
-
-
- -- part 21 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=52 top=60 right=77 bottom=79
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 18
- -- part name: weekday1
-
-
- -- part 22 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=52 top=149 right=166 bottom=79
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 18
- -- part name: weekday2
-
-
- -- part 23 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=52 top=238 right=255 bottom=79
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 18
- -- part name: weekday3
-
-
- -- part 24 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=474 top=60 right=77 bottom=501
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 18
- -- part name: weekday4
-
-
- -- part 25 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=474 top=149 right=166 bottom=501
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 18
- -- part name: weekday5
-
-
- -- part 26 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=311 top=238 right=255 bottom=338
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 18
- -- part name: weekday6
-
-
- -- part 66 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=276 top=32 right=59 bottom=315
- -- title width / last selected line: 0
- -- icon id / first selected line: 17481 / 17481
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Address
- ----- HyperTalk script -----
- on mouseUp
- goAddress
- end mouseUp
-
-
-
- -- part 67 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=322 top=30 right=59 bottom=361
- -- title width / last selected line: 0
- -- icon id / first selected line: 20965 / 20965
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: To Do
- ----- HyperTalk script -----
- on mouseUp
- visual effect zoom open
- go card 1 of bkgnd "To Do"
- end mouseUp
-
-
-
- -- part 68 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=366 top=30 right=59 bottom=405
- -- title width / last selected line: 0
- -- icon id / first selected line: 8961 / 8961
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Daily
- ----- HyperTalk script -----
- on mouseUp
- Answer "You are already in the daily calendar."
- end mouseUp
-
-
-
- -- part 72 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=414 top=30 right=59 bottom=453
- -- title width / last selected line: 0
- -- icon id / first selected line: 22855 / 22855
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
- ----- HyperTalk script -----
- on mouseUp
- goSixMonthly field "weekSecs"
- end mouseUp
-
-
-
- -- part 75 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=462 top=30 right=59 bottom=500
- -- title width / last selected line: 0
- -- icon id / first selected line: 20098 / 20098
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Home
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- go home
- end mouseUp
-
-
-
- -- part 74 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=211 top=34 right=55 bottom=235
- -- title width / last selected line: 0
- -- icon id / first selected line: 30696 / 30696
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Phone
- ----- HyperTalk script -----
- on mouseUp
- send myDial to stack
- end mouseUp
-
-
-
- -- part 76 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=223 top=317 right=335 bottom=243
- -- title width / last selected line: 0
- -- icon id / first selected line: 1014 / 1014
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Prev
- ----- HyperTalk script -----
- on mouseUp
- go prev
- end mouseUp
-
-
- -- part 77 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=268 top=317 right=335 bottom=287
- -- title width / last selected line: 0
- -- icon id / first selected line: 1013 / 1013
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Next
- ----- HyperTalk script -----
- on mouseUp
- go next
- end mouseUp
-
-
- -- part 78 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=476 top=317 right=335 bottom=499
- -- title width / last selected line: 0
- -- icon id / first selected line: 1012 / 1012
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Return
- ----- HyperTalk script -----
- on mouseUp
- visual effect iris close
- pop card
- push card
- end mouseUp
-
-
-
- -- part 82 (field)
- -- low flags: 01
- -- high flags: 0000
- -- rect: left=474 top=238 right=255 bottom=501
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 20
- -- text size: 18
- -- style flags: 0
- -- line height: 18
- -- part name: weekday7
-
-
- -- part 83 (field)
- -- low flags: 81
- -- high flags: 0000
- -- rect: left=96 top=63 right=75 bottom=184
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 0
- -- font id: 4
- -- text size: 9
- -- style flags: 0
- -- line height: 9
- -- part name: weekSecs
-
-
- -- part 86 (button)
- -- low flags: 00
- -- high flags: 0000
- -- rect: left=12 top=318 right=336 bottom=30
- -- title width / last selected line: 0
- -- icon id / first selected line: 26635 / 26635
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name:
- ----- HyperTalk script -----
- on mouseUp
- go to card "About"
- end mouseUp
-
-