<:#283,9360><:f,2Times New Roman,>define WM_GETTEXT 0x000D
<:#283,9360><:f,2Times New Roman,>define SC_RESTORE 0xF120
<:#283,9360><:f,2Times New Roman,>define WM_SYSCOMMAND 0x0112
<:#283,9360><:f,2Times New Roman,>Define WM_SETFONT 0x30
<:#283,9360><:f,2Times New Roman,>Define WM_COMMAND 0x111
<:#283,9360><:f,2Times New Roman,>Define WM_QUIT 0x0012
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>define calstyle "<:f240,2Times New Roman,255,0,0>_orgcal.sty<:f,2Times New Roman,>"
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>declare startcal(p1, p2)
<:#283,9360><:f,2Times New Roman,>declare getorgdata(orgsection, orgsection2)
<:#283,9360><:f,2Times New Roman,>declare readorgdates(p1, p2, p3, p4, p5)
<:#283,9360><:f,2Times New Roman,>declare datenum2datestr(orgmonth)
<:#283,9360><:f,2Times New Roman,>declare autocal(year, month)
<:#283,9360><:f,2Times New Roman,>declare datestr2datenum(orgmonth)
<:#283,9360><:f,2Times New Roman,>declare findday(orgday)
<:#283,9360><:f,2Times New Roman,>declare findday_ann(orgday)
<:#283,9360><:f,2Times New Roman,>declare readorganniversary(dates, text, month)
<:#283,9360><:f,2Times New Roman,>declare createdlgfont()
<:#283,9360><:f,2Times New Roman,>declare setfont(hdlg, id)
<:#283,9360><:f,2Times New Roman,>declare deletefont()
<:#283,9360><:f,2Times New Roman,>declare delfile(filename)
<:#283,9360><:f,2Times New Roman,>declare FindAndReplace(String, Findwhat, Replacewith)
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>' Macro by Charlie Pappas, Calendar by Powell Smith
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function orgcal()
<:#283,9360><:f,2Times New Roman,>'singlestep(0)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>stylesheet = "<:f240,2Times New Roman,255,0,0>_CALORG.STY<:f,2Times New Roman,>"
<:#283,9360><:f,2Times New Roman,>if getopenfilecount() <;> 0
<:f,2Times New Roman,> if (getdocinfo$(ddstylesheet) <<<;> stylesheet)
<:f240,2Times New Roman,0,0,128>Or (GetDocInfo$(dduser8) = 1)
<:#283,9360><:f,2Times New Roman,> if New(stylesheet, WithContents, 1024) <<<;> 1
<:#283,9360><:f,2Times New Roman,> message("Unable to find the style sheet {stylesheet}.", "Ami Pro")
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>else
<:#283,9360><:f,2Times New Roman,> makenew:
<:#283,9360><:f,2Times New Roman,> if New(stylesheet, WithContents, 1024) <<<;> 1
<:f240,2Times New Roman,255,0,0> message("Unable to find the style sheet {stylesheet}.", "Ami Pro")
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>defstr year, month;
<:#283,9360><:f,2Times New Roman,>'goto debug
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>if autocal(&year, &month) <<<;> 1
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>docinfofields("", "", "", "", "", "", "", 1)
<:#283,9360><:f,2Times New Roman,>defstr startrow, startcol, endrow, endcol;
<:#283,9360><:f,2Times New Roman,>TableGetRange(&StartRow, &StartCol, &EndRow, &EndCol)
<:#283,9360><:f,2Times New Roman,>if startrow = 10
<:#283,9360><:f,2Times New Roman,> type("<[>down]<[>down]<[>shiftdown]")
<:#283,9360><:f,2Times New Roman,> answermsgbox(yes)
<:#283,9360><:f,2Times New Roman,> DeleteColumnRow(row)
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>orgsection = GetProfileString$("OrgCal", "Calendar", "amipro2.ini")
<:#283,9360><:f,2Times New Roman,>if orgsection = ""
<:#283,9360><:f,2Times New Roman,> orgsection = "<:f240,2Times New Roman,255,0,0>Calendar<:f,2Times New Roman,>"
<:#283,9360><:f,2Times New Roman,> WriteProfileString("OrgCal", "Calendar", "Calendar", "amipro2.ini")
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>orgsection2 = GetProfileString$("OrgCal", "<:f240,2Times New Roman,255,0,0>Anniversary<:f,2Times New Roman,>", "amipro2.ini")
<:#283,9360><:f,2Times New Roman,>if orgsection2 = ""
<:#283,9360><:f,2Times New Roman,> orgsection2 = "<:f240,2Times New Roman,255,0,0>Anniversary<:f,2Times New Roman,>"
<:#283,9360><:f,2Times New Roman,> WriteProfileString("OrgCal", "Anniversary", "<:f240,2Times New Roman,255,0,0>Anniversary<:f,2Times New Roman,>", "amipro2.ini")
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>windir = getwindowsdirectory$()
<:#283,9360><:f,2Times New Roman,>type("<[>ctrlhome]<[>down]<[>down]")
<:#283,9360><:f,2Times New Roman,>statusbarmsg("<:f240,2Times New Roman,255,0,0>Getting Organizer data...<:f,2Times New Roman,>")
<:#283,9360><:f,2Times New Roman,>if getorgdata(orgsection, orgsection2) <<<;> 1
<:#283,9360><:f,2Times New Roman,> statusbarmsg("")
<:#283,9360><:f,2Times New Roman,> hwnd = findwindow("TZ_PORG", 0)
<:#283,9360><:f,2Times New Roman,> showwindow(hwnd, 1)
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>statusbarmsg("")
<:#283,9360><:f,2Times New Roman,>pause(001)
<:#283,9360><:f,2Times New Roman,>debug:
<:#283,9360><:f,2Times New Roman,>dim dates(1)
<:#283,9360><:f,2Times New Roman,>dim dates_ann(1)
<:#283,9360><:f,2Times New Roman,>dim text(1)
<:#283,9360><:f,2Times New Roman,>dim text_ann(1)
<:#283,9360><:f,2Times New Roman,>dim time(1)
<:#283,9360><:f,2Times New Roman,>monthnum = datestr2datenum(month)
<:#283,9360><:f,2Times New Roman,>statusbarmsg("<:f240,2Times New Roman,255,0,0>Reading Organizer data...<:f,2Times New Roman,>")
<:#283,9360><:f,2Times New Roman,>numrecs = readorgdates(&dates, &text, &time, year, monthnum)
<:#283,9360><:f,2Times New Roman,>statusbarmsg("")
<:#283,9360><:f,2Times New Roman,>if numrecs = 0
<:f240,2Times New Roman,0,0,128> Goto Anniver <:f240,2Times New Roman,0,0,128> ' pmm 5/24/93
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>curday = 1
<:#283,9360><:f,2Times New Roman,>findday(curday)
<:#283,9360><:f,2Times New Roman,>for i = 1 to numrecs
<:#283,9360><:f,2Times New Roman,> orgdate = dates(i)
<:#283,9360><:f,2Times New Roman,> if orgdate <<<;> curday
<:#283,9360><:f,2Times New Roman,> type("<[>tab]<[>up]")
<:#283,9360><:f,2Times New Roman,> curday = findday(orgdate)
<:#283,9360><:f,2Times New Roman,> if curday = 0
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> timex = time(i)
<:#283,9360><:f,2Times New Roman,> txt = text(i)
<:#283,9360><:f,2Times New Roman,> setstyle("Entry")
<:#283,9360><:f,2Times New Roman,> bold()
<:#283,9360><:f,2Times New Roman,> type("{timex}")
<:#283,9360><:f,2Times New Roman,> bold()
<:#283,9360><:f,2Times New Roman,> if Instr(0, txt, " ") <;> 0
<:#283,9360><:f,2Times New Roman,> findandreplace(&txt, " ", " ")
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> type(" {txt}<[>enter]")
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>
<:f240,2Times New Roman,0,0,128>Anniver:
<:#283,9360><:f,2Times New Roman,>if getprofilestring$("OrgCal", "DoAnniversary", "amipro2.ini") <<<;> 1
<:#283,9360><:f,2Times New Roman,> goto done
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>' Now do the anniversary dates
<:#283,9360><:f,2Times New Roman,>type("<[>ctrlhome]<[>down]<[>down]")
<:#283,9360><:f,2Times New Roman,>statusbarmsg("<:f240,2Times New Roman,255,0,0>Reading Organizer Anniversary data...<:f,2Times New Roman,>")
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>numrecs = readorganniversary(&dates_ann, &text_ann, monthnum)
<:#283,9360><:f,2Times New Roman,>statusbarmsg("")
<:#283,9360><:f,2Times New Roman,>if numrecs = 0
<:#283,9360><:f,2Times New Roman,> goto done
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>curday = 1
<:#283,9360><:f,2Times New Roman,>findday_ann(curday)
<:#283,9360><:f,2Times New Roman,>for i = 1 to numrecs
<:#283,9360><:f,2Times New Roman,> orgdate = dates_ann(i)
<:#283,9360><:f,2Times New Roman,> if orgdate <<<;> curday
<:#283,9360><:f,2Times New Roman,> type("<[>tab]<[>up]")
<:#283,9360><:f,2Times New Roman,> curday = findday_ann(orgdate)
<:#283,9360><:f,2Times New Roman,> if curday = 0
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> txt = text_ann(i)
<:#283,9360><:f,2Times New Roman,> if Instr(0, txt, " ") <;> 0
<:#283,9360><:f,2Times New Roman,> findandreplace(&txt, " ", " ")
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> type("{txt}<[>enter]")
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>done:
<:#283,9360><:f,2Times New Roman,>defstr fh;
<:#283,9360><:f,2Times New Roman,>delfile(GetProfileString$("OrgCal", "AnniversaryFile", "amipro2.ini"))
<:#283,9360><:f,2Times New Roman,>delfile(GetProfileString$("OrgCal", "CalendarFile", "amipro2.ini"))
<:#283,9360><:f,2Times New Roman,>pause(001)
<:#283,9360><:f,2Times New Roman,>message("<:f240,2Times New Roman,255,0,0>Here is your calendar from Lotus Organizer.", "Ami Pro<:f,2Times New Roman,>")
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function findday(orgday)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>while(1)
<:#283,9360><:f,2Times New Roman,> curday = curword$()
<:#283,9360><:f,2Times New Roman,> if curday = orgday
<:#283,9360><:f,2Times New Roman,> type("<[>down]")
<:#283,9360><:f,2Times New Roman,> return curday
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> type("<[>tab]")
<:#283,9360><:f,2Times New Roman,> if getmode() <<<;> 129
<:#283,9360><:f,2Times New Roman,> message("<:f240,2Times New Roman,255,0,0>Unable to continue.<:f,2Times New Roman,>", "Ami Pro")
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>wend
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function findday_ann(orgday)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>while(1)
<:#283,9360><:f,2Times New Roman,> curday = curword$()
<:#283,9360><:f,2Times New Roman,> if curday = orgday
<:#283,9360><:f,2Times New Roman,> type("<[>left]")
<:#283,9360><:f,2Times New Roman,> return curday
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> type("<[>tab]")
<:#283,9360><:f,2Times New Roman,> if getmode() <<<;> 129
<:#283,9360><:f,2Times New Roman,> message("<:f240,2Times New Roman,255,0,0>Unable to continue.<:f,2Times New Roman,>", "Ami Pro")
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>wend
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function startcal(year, month)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>defstr startrow, startcol, endrow, endcol;
<:#283,9360><:f,2Times New Roman,>TableGetRange(&StartRow, &StartCol, &EndRow, &EndCol)
<:#283,9360><:f,2Times New Roman,>if startrow = 0
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>type("<[>ctrlhome]");
<:#283,9360><:f,2Times New Roman,>*year = curword$()
<:#283,9360><:f,2Times New Roman,>type("<[>tab]")
<:#283,9360><:f,2Times New Roman,>*month = curword$()
<:#283,9360><:f,2Times New Roman,>type("<[>down]<[>down]<[>home]<[>home]<[>tab]")
<:#283,9360><:f,2Times New Roman,>return 1
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function getorgdata(orgsection, orgsection2)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>onerror endit
<:#283,9360><:f,2Times New Roman,>oncancel endit
<:#283,9360><:f,2Times New Roman,>buffsize=80
<:#283,9360><:f,2Times New Roman,>defstr txt;
<:#283,9360><:f,2Times New Roman,>hwnd = findwindow("TZ_PORG", 0)
<:#283,9360><:f,2Times New Roman,>if isiconic(hwnd)
<:#283,9360><:f,2Times New Roman,> appsendmessage(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0)
<+@><:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>showwindow(hwnd, 0)
<:#283,9360><:f,2Times New Roman,>activateapp("<:f240,2Times New Roman,255,0,0>Lotus Organizer<:f,2Times New Roman,>")
<:#283,9360><:f,2Times New Roman,>enablehardwareinput(0)
<:#283,9360><:f,2Times New Roman,>wparam = 0x03F2
<:#283,9360><:f,2Times New Roman,>lparao = 0x00000000
<:#283,9360><:f,2Times New Roman,>PostMessage(hwnd, wm_command, wparam, lparao)
<:#283,9360><:f,2Times New Roman,>pause(001)
<:#283,9360><:f,2Times New Roman,>hdlg = getactivewindow()
<:S+-1><:#283,9360><:f,2Times New Roman,>sendkeys("<[>ctrlhome]") ' go to beginning of organize and do File/Export
<:S+-1><:#283,9360><:f,2Times New Roman,>pause(002)
<:S+-1><:#283,9360><:f,2Times New Roman,>for i = 1 to 20
<:#283,9360><:f,2Times New Roman,> SendMessageC(GetDlgItem(getactivewindow(), 301), WM_GETTEXT, buffsize, &txt)
<:#283,9360><:f,2Times New Roman,> if Instr(3, txt, orgsection) <;> 1
<:#283,9360><:f,2Times New Roman,> goto rabbit
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> sendkeys("<:f240,2Times New Roman,255,0,0><[>down]<:f,2Times New Roman,>") ' go to next org item in combo box
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>statusbarmsg("")
<:#283,9360><:f,2Times New Roman,>enablehardwareinput(1)
<:#283,9360><:f,2Times New Roman,>return 0
<:#283,9360><:f,2Times New Roman,>rabbit:
<:#283,9360><:f,2Times New Roman,>temp = getwindowsdirectory$()
<:#283,9360><:f,2Times New Roman,>if right$(temp, 1) <<<;> "\"
<:#283,9360><:f,2Times New Roman,> temp = strcat$(temp, "\")
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>again:
<:#283,9360><:f,2Times New Roman,>uname = right$(now(), 7)
<:#283,9360><:f,2Times New Roman,>filename = "{temp}~{uname}.tmp"
<:#283,9360><:f,2Times New Roman,>WriteProfileString("OrgCal", "CalendarFile", filename, "amipro2.ini");
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>sendkeys("<:f240,2Times New Roman,255,0,0><[>alto]<[>altt]u<[>altf]<:f,2Times New Roman,>")
<:#283,9360><:f,2Times New Roman,>pause(001)
<:#283,9360><:f,2Times New Roman,>if GetDlgItemText(getactivewindow(), 307) <<<;> 1
<:#283,9360><:f,2Times New Roman,> sendkeys(" ") ' send a space to check the box
<:#283,9360><:f,2Times New Roman,>endif
<:#566,9360><:f,2Times New Roman,>sendkeys("<:f240,2Times New Roman,255,0,0><[>enter]<:f,2Times New Roman,>") ' U sets US 437 in US, need to localize for each country, also alt+f+space sets field names as first record option
<:#283,9360><:f,2Times New Roman,>'sendkeys("<:f240,2Times New Roman,255,0,0><[>alto]<[>altt]<:f240,2Times New Roman,0,0,255>m<:f240,2Times New Roman,255,0,0><[>enter]<:f,2Times New Roman,>") ' U sets US 437 in US, need to localize for each country
<:f,2Times New Roman,>sendkeys("<:f240,2Times New Roman,255,0,0><[>alte<:f240,2Times New Roman,255,0,0>]a<:f240,2Times New Roman,255,0,0><[>tab]{filename}<:f240,2Times New Roman,255,0,0><[>enter]<[>altm]<[>enter]<:f,2Times New Roman,>") ' command organizer
to export ascii format to file and map all fields
<:#283,9360><:f,2Times New Roman,>hdlg = getactivewindow()
<:#283,9360><:f,2Times New Roman,>defstr windowtext;
<:#283,9360><:f,2Times New Roman,>pause(002)
<:#283,9360><:f,2Times New Roman,>while(1)
<:#283,9360><:f,2Times New Roman,> getwindowtext(getactivewindow(), &windowtext)
<:#283,9360><:f,2Times New Roman,> if windowtext = "<:f240,2Times New Roman,255,0,0>Lotus Organizer<:f,2Times New Roman,>" ' check on export dialog box title bar until it is gone
<:f,2Times New Roman,> sendkeys("<:f240,2Times New Roman,255,0,0><[>esc<:f240,2Times New Roman,255,0,0>]<:f,2Times New Roman,>") ' clear the next message box
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> pause(010)
<:#283,9360><:f,2Times New Roman,> if windowtext <<<;> "<:f240,2Times New Roman,255,0,0>Status<:f,2Times New Roman,>"
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>wend
<:#283,9360><:f,2Times New Roman,>if getprofilestring$("OrgCal", "DoAnniversary", "amipro2.ini") <<<;> 1
<:#283,9360><:f,2Times New Roman,> goto done
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>again2:
<:#283,9360><:f,2Times New Roman,>uname = right$(now(), 7)
<:#283,9360><:f,2Times New Roman,>filename = "{temp}~{uname}.tmp"
<:#283,9360><:f,2Times New Roman,>WriteProfileString("OrgCal", "AnniversaryFile", filename, "amipro2.ini");
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>PostMessage(hwnd, wm_command, wparam, lparao)
<:#283,9360><:f,2Times New Roman,>pause(001)
<:#283,9360><:f,2Times New Roman,>hdlg = getactivewindow()
<:S+-1><:#283,9360><:f,2Times New Roman,>sendkeys("<[>ctrlhome]")
<:S+-1><:#283,9360><:f,2Times New Roman,>for i = 1 to 20
<:#283,9360><:f,2Times New Roman,> SendMessageC(GetDlgItem(getactivewindow(), 301), WM_GETTEXT, buffsize, &txt)
<:#283,9360><:f,2Times New Roman,> if Instr(3, txt, orgsection2) <;> 1
<:#283,9360><:f,2Times New Roman,> goto rabbit2
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> sendkeys("<:f240,2Times New Roman,255,0,0><[>down]<:f,2Times New Roman,>") ' see above
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>enablehardwareinput(1)
<:#283,9360><:f,2Times New Roman,>return 0
<:#283,9360><:f,2Times New Roman,>rabbit2:
<:#283,9360><:f,2Times New Roman,>sendkeys("<:f240,2Times New Roman,255,0,0><[>alto]<[>altt]u<[>altf]<:f,2Times New Roman,>")
<:#283,9360><:f,2Times New Roman,>pause(001)
<:#283,9360><:f,2Times New Roman,>if GetDlgItemText(getactivewindow(), 307) <<<;> 1
<:#283,9360><:f,2Times New Roman,> sendkeys(" ") ' send a space to check the box
<:#283,9360><:f,2Times New Roman,>endif
<:#566,9360><:f,2Times New Roman,>sendkeys("<:f240,2Times New Roman,255,0,0><[>enter]<:f,2Times New Roman,>") ' U sets US 437 in US, need to localize for each country, also alt+f+space sets field names as first record option
<:#283,9360><:f,2Times New Roman,>'sendkeys("<:f240,2Times New Roman,255,0,0><[>alto]<[>altt]<:f240,2Times New Roman,0,0,255>m<:f240,2Times New Roman,255,0,0><[>enter]<:f,2Times New Roman,>") ' U sets US 437 in US, need to localize for each country
<:f,2Times New Roman,>sendkeys("<:f240,2Times New Roman,255,0,0><[>alte<:f240,2Times New Roman,255,0,0>]a<:f240,2Times New Roman,255,0,0><[>tab]{filename}<:f240,2Times New Roman,255,0,0><[>enter]<[>altm]<[>enter]<:f,2Times New Roman,>") ' command organizer
to export ascii format to file and map all fields
<:#283,9360><:f,2Times New Roman,>hdlg = getactivewindow()
<:#283,9360><:f,2Times New Roman,>pause(002)
<:#283,9360><:f,2Times New Roman,>while(1)
<:#283,9360><:f,2Times New Roman,> getwindowtext(getactivewindow(), &windowtext)
<:#283,9360><:f,2Times New Roman,> if windowtext = "<:f240,2Times New Roman,255,0,0>Lotus Organizer<:f,2Times New Roman,>" ' see above
<:f,2Times New Roman,> sendkeys("<:f240,2Times New Roman,255,0,0><[>esc<:f240,2Times New Roman,255,0,0>]<:f,2Times New Roman,>") ' see above
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> pause(010)
<:#283,9360><:f,2Times New Roman,> if windowtext <<<;> "<:f240,2Times New Roman,255,0,0>Status<:f,2Times New Roman,>"
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>wend
<:#283,9360><:f,2Times New Roman,>done:
<:#283,9360><:f,2Times New Roman,>appminimize("<:f240,2Times New Roman,255,0,0>Lotus Organizer<:f,2Times New Roman,>")
<:#283,9360><:f,2Times New Roman,>showwindow(hwnd, 1)
<:#283,9360><:f,2Times New Roman,>activateapp("")
<:#283,9360><:f,2Times New Roman,>enablehardwareinput(1)
<:#283,9360><:f,2Times New Roman,>return 1
<:#283,9360><:f,2Times New Roman,>endit:
<:#283,9360><:f,2Times New Roman,>showwindow(hwnd, 1)
<:#283,9360><:f,2Times New Roman,>enablehardwareinput(1)
<:#283,9360><:f,2Times New Roman,>return 0
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function readorganniversary(dates_ann, text_ann, month)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>onerror endit
<:#283,9360><:f,2Times New Roman,>oncancel endit
<:#283,9360><:f,2Times New Roman,>DIM field(2)
<:#283,9360><:f,2Times New Roman,>'pause(030)
<:#283,9360><:f,2Times New Roman,>datafile = GetProfileString$("OrgCal", "AnniversaryFile", "amipro2.ini");
<:#283,9360><:f,2Times New Roman,>fh = fopen(datafile, "r")
<:#283,9360><:f,2Times New Roman,>if fh = 0
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>if fgets$(fh) = -1
<:#283,9360><:f,2Times New Roman,> fclose(fh)
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>fclose(fh)
<:#283,9360><:f,2Times New Roman,>handle = RecOpen(datafile,, "*Comma:1", 0)
<:#283,9360><:f,2Times New Roman,>IF handle = 0
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>numfields = RecFieldCount(handle)
<:#283,9360><:f,2Times New Roman,>if numfields << 1
<:#283,9360><:f,2Times New Roman,> goto endit
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>sep = GetProfileString$("intl", "sDate")
<:#283,9360><:f,2Times New Roman,>if sep = ""
<:#283,9360><:f,2Times New Roman,> sep = "/"
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>sShortDate = ucase$(GetProfileString$("intl", "sShortDate"))
<:#283,9360><:f,2Times New Roman,>if sShortDate = ""
<:#283,9360><:f,2Times New Roman,> sShortDate = "M/D/YY"
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>for i = 1 to 3
<:#283,9360><:f,2Times New Roman,> smonth = strfield$(sShortDate, i, sep)
<:#283,9360><:f,2Times New Roman,> if smonth = "M"
<:#283,9360><:f,2Times New Roman,> smonth = i
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>for i = 1 to 3
<:#283,9360><:f,2Times New Roman,> sday = strfield$(sShortDate, i, sep)
<:#283,9360><:f,2Times New Roman,> if sday = "D"
<:#283,9360><:f,2Times New Roman,> sday = i
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>for i = 1 to 3
<:#283,9360><:f,2Times New Roman,> syear = strfield$(sShortDate, i, sep)
<:#283,9360><:f,2Times New Roman,> if syear = "YY"
<:#283,9360><:f,2Times New Roman,> syear = i
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>FOR I = 1 to 2
<:#283,9360><:f,2Times New Roman,> name = (RecFieldName$(handle, I))
<:#283,9360><:f,2Times New Roman,> field(i) = name
<:#283,9360><:f,2Times New Roman,>NEXT
<:#283,9360><:f,2Times New Roman,>i = 1
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>WHILE RecNextRec(handle) = 0
<:#283,9360><:f,2Times New Roman,> name = (RecGetField(handle, field(1))); ' date
<:#283,9360><:f,2Times New Roman,> orgmonth = strfield$(name, smonth, sep)
<:#283,9360><:f,2Times New Roman,> if orgmonth <<<;> month
<:#283,9360><:f,2Times New Roman,> goto skipit
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> date = strfield$(name, sday, sep)
<:#283,9360><:f,2Times New Roman,> if left$(date, 1) = 0
<:#283,9360><:f,2Times New Roman,> date = right$(date, 1)
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> ArrayInsert(&dates_ann, i, date) ' insert the date
<:#283,9360><:f,2Times New Roman,> name = (RecGetField(handle, field(2)));
<:#283,9360><:f,2Times New Roman,> ArrayInsert(&text_ann, i, name)
<:#283,9360><:f,2Times New Roman,> statusbarmsg(name)
<:#283,9360><:f,2Times New Roman,> i = i + 1
<:#283,9360><:f,2Times New Roman,> skipit:
<:#283,9360><:f,2Times New Roman,>WEND
<:#283,9360><:f,2Times New Roman,>RecClose(handle)
<:#283,9360><:f,2Times New Roman,>statusbarmsg("")
<:#283,9360><:f,2Times New Roman,>return i - 1
<:#283,9360><:f,2Times New Roman,>endit:
<:#283,9360><:f,2Times New Roman,>RecClose(handle)
<:#283,9360><:f,2Times New Roman,>statusbarmsg("")
<:#283,9360><:f,2Times New Roman,>return 0
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function readorgdates(dates, text, time, year, month)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>onerror endit
<:#283,9360><:f,2Times New Roman,>oncancel endit
<:#283,9360><:f,2Times New Roman,>mynumfields = 4
<:#283,9360><:f,2Times New Roman,>year = right$(year, 2)
<:#283,9360><:f,2Times New Roman,>DIM field(mynumfields)
<:#283,9360><:f,2Times New Roman,>datafile = GetProfileString$("OrgCal", "CalendarFile", "amipro2.ini");
<:#283,9360><:f,2Times New Roman,>'pause(030)
<:#283,9360><:f,2Times New Roman,>fh = fopen(datafile, "r")
<:#283,9360><:f,2Times New Roman,>if fh = 0
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>if fgets$(fh) = -1
<:#283,9360><:f,2Times New Roman,> fclose(fh)
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>fclose(fh)
<:#283,9360><:f,2Times New Roman,>handle = RecOpen(datafile,, "*Comma:1", 0)
<:#283,9360><:f,2Times New Roman,>IF handle = 0
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>numfields = RecFieldCount(handle)
<:#283,9360><:f,2Times New Roman,>if numfields << 1
<:#283,9360><:f,2Times New Roman,> goto endit
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>sep = GetProfileString$("intl", "sDate")
<:#283,9360><:f,2Times New Roman,>if sep = ""
<:#283,9360><:f,2Times New Roman,> sep = "/"
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>sShortDate = ucase$(GetProfileString$("intl", "sShortDate"))
<:#283,9360><:f,2Times New Roman,>if sShortDate = ""
<:#283,9360><:f,2Times New Roman,> sShortDate = "M/D/YY"
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>for i = 1 to 3
<:#283,9360><:f,2Times New Roman,> smonth = strfield$(sShortDate, i, sep)
<:#283,9360><:f,2Times New Roman,> if smonth = "M"
<:#283,9360><:f,2Times New Roman,> smonth = i
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>for i = 1 to 3
<:#283,9360><:f,2Times New Roman,> sday = strfield$(sShortDate, i, sep)
<:#283,9360><:f,2Times New Roman,> if sday = "D"
<:#283,9360><:f,2Times New Roman,> sday = i
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>for i = 1 to 3
<:#283,9360><:f,2Times New Roman,> syear = strfield$(sShortDate, i, sep)
<:#283,9360><:f,2Times New Roman,> if syear = "YY"
<:#283,9360><:f,2Times New Roman,> syear = i
<:#283,9360><:f,2Times New Roman,> break
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>FOR i = 1 to mynumfields
<:#283,9360><:f,2Times New Roman,> name = (RecFieldName$(handle, i))
<:#283,9360><:f,2Times New Roman,> field(i) = name
<:#283,9360><:f,2Times New Roman,>NEXT
<:#283,9360><:f,2Times New Roman,>i = 1
<:#283,9360><:f,2Times New Roman,>WHILE RecNextRec(handle) = 0
<:#283,9360><:f,2Times New Roman,> name = (RecGetField(handle, field(1))); ' date
<:#283,9360><:f,2Times New Roman,> orgyear = strfield$(name, syear, sep)
<:#283,9360><:f,2Times New Roman,> if orgyear <<<;> year
<:#283,9360><:f,2Times New Roman,> goto skipit
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> orgmonth = strfield$(name, smonth, sep)
<:#283,9360><:f,2Times New Roman,> if orgmonth <<<;> month
<:#283,9360><:f,2Times New Roman,> goto skipit
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> date = strfield$(name, sday, sep)
<:#283,9360><:f,2Times New Roman,> if left$(date, 1) = 0
<:#283,9360><:f,2Times New Roman,> date = right$(date, 1)
<:#283,9360><:f,2Times New Roman,> endif
<:#283,9360><:f,2Times New Roman,> ArrayInsert(&dates, i, date) ' insert the date
<:#283,9360><:f,2Times New Roman,> name = (RecGetField(handle, field(2))); ' time
<:#283,9360><:f,2Times New Roman,> ArrayInsert(&time, i, name)
<:#283,9360><:f,2Times New Roman,> name = (RecGetField(handle, field(4))); ' text
<:#283,9360><:f,2Times New Roman,> ArrayInsert(&text, i, name)
<:#283,9360><:f,2Times New Roman,> statusbarmsg(name)
<:#283,9360><:f,2Times New Roman,> i = i + 1
<:#283,9360><:f,2Times New Roman,> skipit:
<:#283,9360><:f,2Times New Roman,>WEND
<:#283,9360><:f,2Times New Roman,>RecClose(handle)
<:#283,9360><:f,2Times New Roman,>statusbarmsg("")
<:#283,9360><:f,2Times New Roman,>return i - 1
<:#283,9360><:f,2Times New Roman,>endit:
<:#283,9360><:f,2Times New Roman,>RecClose(handle)
<:#283,9360><:f,2Times New Roman,>statusbarmsg("")
<:#283,9360><:f,2Times New Roman,>return 0
<:#283,9360><:f,2Times New Roman,>end function
@Function@<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function helpme()
<:#566,9360><:f,2Times New Roman,>WinHelpa(FindWindow("AmiProWndA", 0), strcat$(GetAmiDirectory$(), "HelpPack.hlp"), 0x0001, 140)
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function datenum2datestr(orgmonth)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>switch orgmonth
<:#283,9360><:f,2Times New Roman,> case 01
<:#283,9360><:f240,2Times New Roman,255,0,0> return "January"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 02
<:#283,9360><:f240,2Times New Roman,255,0,0> return "February"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 03
<:#283,9360><:f240,2Times New Roman,255,0,0> return "March"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 04
<:#283,9360><:f240,2Times New Roman,255,0,0> return "April"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 05
<:#283,9360><:f240,2Times New Roman,255,0,0> return "May"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 06
<:#283,9360><:f240,2Times New Roman,255,0,0> return "June"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 07
<:#283,9360><:f240,2Times New Roman,255,0,0> return "July"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 08
<:#283,9360><:f240,2Times New Roman,255,0,0> return "August"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 09
<:#283,9360><:f240,2Times New Roman,255,0,0> return "September"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 10
<:#283,9360><:f240,2Times New Roman,255,0,0> return "October"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 11
<:#283,9360><:f240,2Times New Roman,255,0,0> return "November"
<:#283,9360><:f240,2Times New Roman,255,0,0> case 12
<:#283,9360><:f240,2Times New Roman,255,0,0> return "December"
<:#283,9360><:f,2Times New Roman,>endswitch
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
@Function@<:#283,9360><:f,2Times New Roman,>function datestr2datenum(orgmonth)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>switch orgmonth
<:#283,9360><:f240,2Times New Roman,255,0,0> case "January"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 01
<:#283,9360><:f240,2Times New Roman,255,0,0> case "February"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 02
<:#283,9360><:f240,2Times New Roman,255,0,0> case "March"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 03
<:#283,9360><:f240,2Times New Roman,255,0,0> case "April"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 04
<:#283,9360><:f240,2Times New Roman,255,0,0> case "May"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 05
<:#283,9360><:f240,2Times New Roman,255,0,0> case "June"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 06
<:#283,9360><:f240,2Times New Roman,255,0,0> case "July"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 07
<:#283,9360><:f240,2Times New Roman,255,0,0> case "August"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 08
<:#283,9360><:f240,2Times New Roman,255,0,0> case "September"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 09
<:#283,9360><:f240,2Times New Roman,255,0,0> case "October"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 10
<:#283,9360><:f240,2Times New Roman,255,0,0> case "November"
<:#283,9360><:f240,2Times New Roman,255,0,0> return 11
<:#283,9360><:f240,2Times New Roman,255,0,0> case "December"
<:#283,9360><:f,2Times New Roman,> return 12
<:#283,9360><:f,2Times New Roman,>endswitch
<:#283,9360><:f,2Times New Roman,>end function
@Function@<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>FUNCTION AutoCal(year, month)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
@Remark@<:#283,9360><:f,2Times New Roman,>'Declaration of Variables
<:f,2Times New Roman,>DEFSTR Month1 <:f160,2Times New Roman,255,0,0>'This variable contains the month direct from the dialog box.
<:f,2Times New Roman,>DEFSTR Year1 <:f160,2Times New Roman,255,0,0> 'This variable contains the year direct from dialog box (YYYY).
<:f,2Times New Roman,>DEFSTR LMonth <:f160,2Times New Roman,255,0,0> 'This variable contains the calendar month in lower case.
<:f,2Times New Roman,>DEFSTR NMonth <:f160,2Times New Roman,255,0,0> 'This variable contains the month and day of Calendar Date (MM/DD/).
<:f,2Times New Roman,>DEFSTR Stat1 <:f160,2Times New Roman,255,0,0>'This variable checks for Cancel from dialog box.
<:f,2Times New Roman,>DEFSTR FirstDayWeek <:f160,2Times New Roman,255,0,0> 'This contains the Value of the day of the week the month starts on.
<:f,2Times New Roman,>DEFSTR LastDay <:f160,2Times New Roman,255,0,0>'This contains the value of the number of days in current month.
<:f,2Times New Roman,>DEFSTR ChkLen <:f160,2Times New Roman,255,0,0>'This contains the value representing the number of characters in the year that was typed in Heymon.
<:f,2Times New Roman,>DEFSTR CurStyleSheet <:f160,2Times New Roman,255,0,0>'This contains the style sheet for the current dicument
<:f,2Times New Roman,>DEFSTR CurDocName <:f160,2Times New Roman,255,0,0> 'This contains the name of the current document.
<:#283,9360><:f,2Times New Roman,>DEFSTR TotalWindows <:f160,2Times New Roman,255,0,0>'This contains the number of MDI windows open when starting macro.
@Remark@<:#283,9360><:f,2Times New Roman,>'Declaration of Functions.
<:#283,9360><:f,2Times New Roman,>DECLARE BuildDate(M,Y,N)
<:#283,9360><:f,2Times New Roman,>DECLARE FillCalendar(F,L)
<:#283,9360><:f,2Times New Roman,>DECLARE CheckLeap(M,Y,N)
<:#283,9360><:f,2Times New Roman,>DECLARE AdjustTable()
<:#283,9360><:f,2Times New Roman,>NW=IsNewWave()
<:#283,9360><:f,2Times New Roman,>if nw = 1
<:#283,9360><:f,2Times New Roman,> message("<:f240,2Times New Roman,255,0,0>Unable to run under NewWave.<:f,2Times New Roman,>", "Ami Pro")
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>ENDIF
<:#283,9360><:f,2Times New Roman,>LayoutMode()
<:#283,9360><:f,2Times New Roman,>FullPageView()
<:#283,9360><:f,2Times New Roman,>rmac = getrunningmacrofile$()
<:#283,9360><:f,2Times New Roman,>tryagain:
@Remark@<:#283,9360><:f,2Times New Roman,>'Fill Edit boxes with current Month and Year.
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,StrField$(FormatDate$(Now(),"c"),2." "))
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9501,StrField$(FormatDate$(Now(),"c"),3." "))
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"January")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"February")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"March")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"April")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"May")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"June")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"July")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"August")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"September")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"October")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"November")
<:#283,9360><:f240,2Times New Roman,255,0,0>FillEdit(9500,"December")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1980")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1981")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1982")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1983")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1984")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1985")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1986")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1987")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1988")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1989")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1990")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1991")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1992")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1993")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1994")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1995")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1996")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1997")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1998")
<:#283,9360><:f,2Times New Roman,>FillEdit(9501,"1999")
<:#283,9360><:f,2Times New Roman,>filledit(20, getprofilestring$("OrgCal", "DoAnniversary", "amipro2.ini"))
@Remark@<:#283,9360><:f,2Times New Roman,>
@Remark@<:#283,9360><:f,2Times New Roman,>'Call Dialog box for data entry and get data from edit boxes.
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>SetDlgCallBack(0, "{rmac}!initdlg")
<:#283,9360><:f,2Times New Roman,>dlgkeyinterrupt(<[>f1], "{rmac}!helpme")
<:#283,9360><:f,2Times New Roman,>windir = getwindowsdirectory$()
<:#283,9360><:f,2Times New Roman,>currentcalname = getprofilestring$("OrgCal", "Calendar", "{windir}amipro2.ini")
<:f,2Times New Roman,>if currentcalname = ""
<:f,2Times New Roman,> filledit(8000, "Calendar")
<:f,2Times New Roman,>else
<:f,2Times New Roman,> filledit(8000, currentcalname)
<:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>Stat1=DialogBox("." "Heymon")
<:#283,9360><:f,2Times New Roman,>deletefont()
<:#283,9360><:f,2Times New Roman,>if stat1 = 0
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:#283,9360><:f,2Times New Roman,>if findwindow("TZ_PORG", 0) << 1
<:#283,9360><:f,2Times New Roman,> PostMessage(getactivewindow(),0x111,1,0)
<:#283,9360><:f,2Times New Roman,> message("<:f240,2Times New Roman,255,0,0>Lotus Organizer is not running.<:f,2Times New Roman,>", "Ami Pro")
<:#283,9360><:f,2Times New Roman,> return 0
<:#283,9360><:f,2Times New Roman,>endif
<:f,2Times New Roman,>writeprofilestring("OrgCal", "Calendar", getdialogfield$(8000), "{windir}amipro2.ini")<:f>
<:#283,9360><:f,2Times New Roman,>Month1=GetDialogField$(9500)
<:#283,9360><:f,2Times New Roman,>Year1=GetDialogField$(9501)
@Remark@<:#283,9360><:f,2Times New Roman,>WriteProfileString("OrgCal", "DoAnniversary", getdialogfield$(20), "amipro2.ini")
@Remark@<:#283,9360><:f,2Times New Roman,>'Check for Cancel.
@Remark@<:#283,9360><:f,2Times New Roman,>'Check for error in entry.
<:#283,9360><:f,2Times New Roman,>IF Year1 << 1980 OR Year1 <;> 1999
<:#283,9360><:f,2Times New Roman,> Message("Year must be in the range 1980 to 1999.")
<:#283,9360><:f,2Times New Roman,> FillEdit(9500,Month1)
<:#283,9360><:f,2Times New Roman,> FillEdit(9501,Year1)
<:#283,9360><:f,2Times New Roman,> GOTO TryAgain
<:#283,9360><:f,2Times New Roman,>ENDIF
<:#283,9360><:f,2Times New Roman,>ChkLen = LEN(Year1)
<:#283,9360><:f,2Times New Roman,>IF ChkLen<<<;>4
<:f240,2Times New Roman,255,0,0> Message("Year must be in the format, YYYY (Ex. '1991')")
<:#283,9360><:f,2Times New Roman,> FillEdit(9500,Month1)
<:#283,9360><:f,2Times New Roman,> FillEdit(9501,Year1)
<:#283,9360><:f,2Times New Roman,> GOTO TryAgain
<:#283,9360><:f,2Times New Roman,>'ELSEIF Year1<<1980 OR Year1<;>1999
<:f240,2Times New Roman,255,0,0> Message("Year must be in a range from 1980 to 1999.")
<:#283,9360><:f,2Times New Roman,> FillEdit(9500,Month1)
<:#283,9360><:f,2Times New Roman,> FillEdit(9501,Year1)
<:#283,9360><:f,2Times New Roman,> GOTO TryAgain
<:#283,9360><:f,2Times New Roman,>ENDIF
@Remark@<:#283,9360><:f,2Times New Roman,>'Convert month to lower case and process.
<:#283,9360><:f,2Times New Roman,>LMonth=LCase$(Month1)
<:#283,9360><:f,2Times New Roman,>IF LMonth= <:f240,2Times New Roman,255,0,0>"january"
<:f,2Times New Roman,> NMonth=<:f240,2Times New Roman,255,0,0>"01/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=31
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f,2Times New Roman,>ELSEIF LMonth= <:f240,2Times New Roman,255,0,0>"february"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="02/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=CheckLeap(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "march"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="03/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=31
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "april"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="04/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=30
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "may"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="05/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=31
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "june"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="06/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=30
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "july"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="07/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=31
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "august"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="08/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=31
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "september"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="09/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=30
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "october"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="10/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=31
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "november"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="11/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=30
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f240,2Times New Roman,255,0,0>ELSEIF LMonth= "december"
<:#283,9360><:f240,2Times New Roman,255,0,0> NMonth="12/01/"
<:#283,9360><:f,2Times New Roman,> LastDay=31
<:#283,9360><:f,2Times New Roman,> FirstDayWeek=BuildDate(Month1,Year1,NMonth)
<:#283,9360><:f,2Times New Roman,> FillCalendar(FirstDayWeek,LastDay)
@Remark@<:#283,9360><:f,2Times New Roman,>'Check for error in Month entry
<:#283,9360><:f,2Times New Roman,>ELSE
<:#283,9360><:f240,2Times New Roman,255,0,0> Message ("This is not a valid month. Please try again.")
<:#283,9360><:f,2Times New Roman,> FillEdit(9500,Month1)
<:#283,9360><:f,2Times New Roman,> FillEdit(9501,Year1)
<:#283,9360><:f,2Times New Roman,> GOTO TryAgain
<:#283,9360><:f,2Times New Roman,>ENDIF;
<:#283,9360><:f,2Times New Roman,>*year = year1;
<:#283,9360><:f,2Times New Roman,>*month = month1
<:#283,9360><:f,2Times New Roman,>return 1
<:#283,9360><:f,2Times New Roman,>END FUNCTION
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>Function BuildDate(Month1,Year1,NMonth)
@Remark@<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>DEFSTR CDate
<:#283,9360><:f,2Times New Roman,>DEFSTR NDate
<:#283,9360><:f,2Times New Roman,>DEFSTR NDays
<:#283,9360><:f,2Times New Roman,>DEFSTR WDate
<:#283,9360><:f,2Times New Roman,>DEFSTR DateRef
<:#283,9360><:f,2Times New Roman,>DEFSTR TYear
@Remark@<:#283,9360><:f,2Times New Roman,>'Extract last two digits of date for processing.
<:#283,9360><:f,2Times New Roman,>TYear=Mid$(Year1,3,2)
<:#283,9360><:f,2Times New Roman,>CDate=StrCat$(NMonth,TYear)
<:#283,9360><:f240,2Times New Roman,255,0,0>DateRef="01/01/90"
<:#283,9360><:f,2Times New Roman,>NDays=DateDiff(CDate,DateRef)
<:#283,9360><:f,2Times New Roman,>NDate=NDays*86400+631224000
<:#283,9360><:f,2Times New Roman,>WDate=FormatDate$(NDate,"f")
<:#283,9360><:f,2Times New Roman,>BuildDate=StrField$(WDate,1," ")
<:#283,9360><:f,2Times New Roman,>Type("<[>CtrlHome]{Year1}<[>Tab]{Month1}<[>Tab]{Year1}")
<:#283,9360><:f,2Times New Roman,>END FUNCTION
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>FUNCTION FillCalendar(FirstDayWeek,LastDay)
<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>'answermsgbox(yes)
<:#283,9360><:f,2Times New Roman,>'SaveAs("x.sam", 1, "", "")
<:#283,9360><:f,2Times New Roman,>DEFSTR DayNum
<:#283,9360><:f,2Times New Roman,>DEFSTR Column
<:#283,9360><:f,2Times New Roman,>DEFSTR Row
<:#283,9360><:f,2Times New Roman,>DEFSTR Row2
<:#283,9360><:f,2Times New Roman,>DEFSTR Row3
<:#283,9360><:f,2Times New Roman,>DEFSTR R1
<:#283,9360><:f,2Times New Roman,>DEFSTR R2
<:#283,9360><:f,2Times New Roman,>DEFSTR R3
<:#283,9360><:f,2Times New Roman,>DEFSTR R4
<:#283,9360><:f,2Times New Roman,>Type( "<[>CTRLHome]<[>Down]<[>Down]<[>Right]" )
<:#283,9360><:f,2Times New Roman,>DayNum=1
<:#283,9360><:f,2Times New Roman,>IF FirstDayWeek=<:f240,2Times New Roman,255,0,0>"Sunday"
<:#283,9360><:f,2Times New Roman,> FOR R1=1 TO 6
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,> NEXT
<:#283,9360><:f,2Times New Roman,>ELSEIF FirstDayWeek=<:f240,2Times New Roman,255,0,0>"Monday"
<:#283,9360><:f,2Times New Roman,> Type("<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> FOR R1=1 TO 5
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,> NEXT
<:#283,9360><:f,2Times New Roman,>ELSEIF FirstDayWeek=<:f240,2Times New Roman,255,0,0>"Tuesday"
<:#283,9360><:f,2Times New Roman,> Type("<[>Right]<[>Right]<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> FOR R2=1 TO 4
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,> NEXT
<:#283,9360><:f,2Times New Roman,>ELSEIF FirstDayWeek=<:f240,2Times New Roman,255,0,0>"Wednesday"
<:#283,9360><:f,2Times New Roman,> Type("<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> FOR R3=1 TO 3
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,> NEXT
<:#283,9360><:f,2Times New Roman,>ELSEIF FirstDayWeek=<:f240,2Times New Roman,255,0,0>"Thursday"
<:#283,9360><:f,2Times New Roman,> Type("<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> FOR R4=1 TO 2
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,> NEXT
<:#283,9360><:f,2Times New Roman,>ELSEIF FirstDayWeek=<:f240,2Times New Roman,255,0,0>"Friday"
<:#283,9360><:f,2Times New Roman,> Type("<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,>ELSEIF FirstDayWeek=<:f240,2Times New Roman,255,0,0>"Saturday"
<:#849,9360><:f,2Times New Roman,> Type("<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,>ENDIF
<:#283,9360><:f,2Times New Roman,>Type("{DayNum}<[>Right]<[>Down]<[>Right]")
<:#283,9360><:f,2Times New Roman,>DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,>FOR Column=2 <++>to<-+> 6
<:#283,9360><:f,2Times New Roman,> FOR Row= 1 <++>to<-+> 6
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>Right]<[>Right]")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,> IF DayNum <;> LastDay
<:#283,9360><:f,2Times New Roman,> EXIT FUNCTION
<:#283,9360><:f,2Times New Roman,> ENDIF
<:#283,9360><:f,2Times New Roman,> NEXT
<:#283,9360><:f,2Times New Roman,> IF Column=7 AND DayNum<<LastDay
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,> Type("<[>Right]")
<:#283,9360><:f,2Times New Roman,>' AdjustTable()
<:#283,9360><:f,2Times New Roman,> FOR Row2=1 TO 7
<:#283,9360><:f,2Times New Roman,>' ConnectCells()
<:#283,9360><:f,2Times New Roman,>goto debug
<:#283,9360><:f,2Times New Roman,> FOR Row3=1 TO 2
<:#283,9360><:f,2Times New Roman,> TurnOn=TopSide
<:#283,9360><:f,2Times New Roman,> TurnOff=0
<:#283,9360><:f,2Times New Roman,> StaySame=CellShade + Outline
<:#283,9360><:f,2Times New Roman,> TableLines(TurnOn, TurnOff, StaySame, Hairline, CellShade)
<:#283,9360><:f,2Times New Roman,> Type("<[>CTRLRight]")
<:#283,9360><:f,2Times New Roman,> NEXT
<:#283,9360><:f,2Times New Roman,> Type("<[>CTRLLeft]")
<:#283,9360><:f,2Times New Roman,>debug:
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}")
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,> Type("<[>CTRLRight]")
<:#283,9360><:f,2Times New Roman,> IF DayNum <;> LastDay
<:#283,9360><:f,2Times New Roman,> BREAK
<:#283,9360><:f,2Times New Roman,> ENDIF
<:#283,9360><:f,2Times New Roman,> NEXT
<:#283,9360><:f,2Times New Roman,> ELSEIF DayNum = LastDay
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>CtrlHome]")
<:#283,9360><:f,2Times New Roman,> BREAK
<:#283,9360><:f,2Times New Roman,> ELSE
<:#283,9360><:f,2Times New Roman,> Type("{DayNum}<[>Right]<[>Down]<[>Right]")
<:#283,9360><:f,2Times New Roman,> ENDIF
<:#283,9360><:f,2Times New Roman,> DayNum=DayNum + 1
<:#283,9360><:f,2Times New Roman,>NEXT
<:#283,9360><:f,2Times New Roman,>END FUNCTION
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>FUNCTION CheckLeap(Month1,Year1,NMonth)
@Remark@<:#283,9360><:f,2Times New Roman,>ignorekeyboard(1)
<:#283,9360><:f,2Times New Roman,>DEFSTR CDate
<:#283,9360><:f,2Times New Roman,>DEFSTR NDate
<:#283,9360><:f,2Times New Roman,>DEFSTR NDays
<:#283,9360><:f,2Times New Roman,>DEFSTR WDate
<:#283,9360><:f,2Times New Roman,>DEFSTR DateRef
<:#283,9360><:f,2Times New Roman,>DEFSTR TYear
<:#283,9360><:f,2Times New Roman,>DEFSTR LNDate
<:#283,9360><:f,2Times New Roman,>DEFSTR LeapDate
@Remark@<:#283,9360><:f,2Times New Roman,>'Extract last two digits of date for processing.
<:#283,9360><:f,2Times New Roman,>TYear=Mid$(Year1,3,2)
<:#283,9360><:f,2Times New Roman,>CDate=StrCat$(NMonth,TYear)
<:#283,9360><:f240,2Times New Roman,255,0,0>DateRef="01/01/90"
<:#283,9360><:f,2Times New Roman,>NDays=DateDiff(CDate,DateRef)
<:#283,9360><:f,2Times New Roman,>NDate=NDays*86400+631224000
<:#283,9360><:f,2Times New Roman,>LNDate=NDate + 2419200
<:#283,9360><:f240,2Times New Roman,255,0,0>LeapDate=FormatDate$(LNDate,"a")
<:#283,9360><:f,2Times New Roman,>LeapNum=StrField$(LeapDate,1,"/")
<:#283,9360><:f,2Times New Roman,>IF LeapNum=3
<:#283,9360><:f,2Times New Roman,> CheckLeap=28
<:#283,9360><:f,2Times New Roman,>ELSE
<:#283,9360><:f,2Times New Roman,> CheckLeap=29
<:#283,9360><:f,2Times New Roman,>ENDIF
<:#283,9360><:f,2Times New Roman,>END FUNCTION
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>
<:#283,9360><:f,2Times New Roman,>function initdlg(hdlg, id, value)
<:#283,9360><:f,2Times New Roman,>for i = 1002 to 1008
<:#283,9360><:f,2Times New Roman,> setfont(hdlg, i)
<:#283,9360><:f,2Times New Roman,>next
<:#283,9360><:f,2Times New Roman,>end function
<:#283,9360><:f,2Times New Roman,>
@Remark@<:#283,9360><:f,2Times New Roman,>'Dialog Box Section