Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Grumpfish Library 3.2 - <b>popdate()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
POPDATE()

    POPDATE() is a multi-user calendar with an integrated appointment
    tracker. You can point and shoot on any date to add, edit, or view
    appointments for that date.  You may also print or delete
    appointments for any range of dates.  More advanced features include
    the ability to add periodically recurring appointments, and to view
    days and weeks at-a-glance to determine when you have free time to
    schedule an appointment.

    When you first enter the calendar, the current month will be
    displayed along with the first two weeks of the next month.  The
    current day will blink.  If there are any appointments for the
    current date, the first seven will be displayed in a window beneath
    the calendar.  Any other days that have appointments will be
    displayed in reverse video.

    The appointment tracker utilizes three files: APPT.DBF, APPT.DBT,
    and APPT.NTX.  It will create these files automatically if they do
    not already exist.  The structure for APPT.DBF is as follows:

    Field name   Type      Width

    USERID       Character     8 (new for version 3.0)
    DATE         Date          8
    TIME         Character     5
    ENDTIME      Character     5
    BRIEF        Character    50
    COMMENTS     Memo         10

    The index key for APPT.NTX is "DTOS(date) + TIME".

    You can instruct the appointment tracker to search a specific
    subdirectory for the appointment database by initializing a memory
    variable named 'apptdir' with the value of the desired directory
    (example: "C:\APPTS").  If 'apptdir' is not defined in your program,
    the current directory will be used.  If the program cannot locate
    the appointment database in the specified subdirectory, it will
    recreate it.

    Active keys

    LtArrow  Go backward one day
    RtArrow  Go forward one day
    UpArrow  Go backward one week
    DnArrow  Go forward one week
    PgUp     Go back one month
    PgDn     Go forward one month
    Home     Jump to first day of month
    End      Jump to last day of month
    Enter    Add/Edit/View appointments
    C        Jump to current (system) date (new for Version 3.0)
    P        Print appointments for range of dates
    D        Delete appointments for range of dates
    S        Search for text in any appointment (new for Version 3.0)
    T        Daily Time Blocks
    W        Weekly Time Blocks (new for Version 3.0)
    Esc      Exit calendar

    Adding/Editing/Viewing Appointments

    Use the navigation keys to move to the desired date, then press
    Enter.  A browse window will appear near the bottom of the screen
    showing the time and description of all appointments for that date.
    If there are not already appointments for that date, you will
    automatically be placed in Add mode.  The following options are
    available at this point:

    A     Add new appointment
    E     Edit highlighted appointment
    D     Delete highlighted appointment
    M     Move highlighted appointment
    R     Recurring appointment
    N     Edit Notes for highlighted appointment
    Esc   Exit back to calendar

    To add a new appointment, press "A".  Enter the starting and ending
    time for the new appointment, along with a brief description.  The
    ending time must be later than the starting time.  In addition, if
    you attempt to add an appointment that conflicts time-wise with an
    already existing appointment, you will get an error message to that
    effect.  Press Ctrl-W to save the new appointment or Esc to exit
    without saving.

    To edit the highlighted appointment, press "E".  As with new
    appointments, the ending time must be later than the starting time,
    and you will not be allowed to enter times that would conflict with
    another appointment.  Press Ctrl-W to save your edits, or Esc to
    exit without saving.

    To delete the highlighted appointment, press "D".  You will be asked
    to confirm your request, to which you should respond by pressing "Y"
    for Yes or "N" for No.

    You may move appointments from one day to another by pressing "M".
    A window will appear, and you will be prompted to enter the new date
    for this appointment.

    To add a recurring appointment, press "R".  Follow the same steps
    as when adding a single appointment.  After you press Ctrl-W to save
    the appointment, you will be given the following options:

    i.    Every day-of-week (Mon., Tue., etc.)
    ii.   Every other day-of-week
    iii.  Every ... day of the month (1st, etc.)
    iv.   Every day
    v.    Every ... day-of-week (e.g., 3rd Wednesday, etc.)
    vi.   Every weekday (not applicable to
          weekend appointments, naturally)

    Use the arrow keys to move the highlight bar to the desired
    option and press Enter.

    To add or edit notes for the highlighted appointment, press "N".
    A window will open below the appointment window, into which you may
    type away to your heart's content.  Press Ctrl-W to save your edits,
    or Esc to exit without saving.  Appointments that have notes
    attached to them will have a checkmark displayed to the right of the
    description.

    To exit from the appointment window back to the calendar, press Esc.

    Printing Appointments

    To print appointments, press "P".  You then have the option of
    printing for the current week, or for a range of dates.  If you
    print for a week, you will be asked to enter a specific user ID (or
    "ALL" if you want to print for all users).  The weekly report is
    nicely formatted using IBM Graphics characters, and will make a
    lasting impression on your supervisors and co-workers.

    If you print for a range of dates, you will then be prompted to
    enter the starting and ending dates.  If there are no appointments
    within that range, you will be informed of this. Otherwise, you will
    be asked if you wish to include comments on the printout.

    Deleting Appointments

    To delete all appointments for a range of dates, press "D".  You
    will then be asked to enter the starting and ending dates.  If there
    are no appointments within that range, you will be informed of this.
    Otherwise, the number of affected appointments will be displayed,
    and you will be asked to confirm your request.  Press "Y" to go
    ahead with it, or "N" if you chicken out.

    Time Blocks

    Daily

    As previously mentioned, when you are in the calendar and
    appointments exist for the current date, they will be displayed in a
    window near the bottom of the screen.  However, let us suppose that
    you are in a hurry and need to know what blocks of time are
    available for the day.  With the Daily Time Blocks feature, you need
    not pore over each appointment. Press "T    and a graph showing
    available and used time blocks will be displayed below the calendar.
    The graph starts at 0600 and ends at 2200.  Each block represents an
    interval of fifteen minutes.  There will be one row for each user
    that has appointments on this date.

    Weekly

    Weekly Time Blocks are similar to Daily Time Blocks, though obviously
    not as detailed.  When you press "W    you will be presented with a
    daily breakdown of appointments for the current week.  (If you are
    on a weekend day in the calendar, you will be shown the following
    business week.)  In this display, each daily graph begins at 0600
    and ends at 1700, and each block represents an interval of one hour.

    Checking Daily Appointments

    By adding all of one (1) line of code, you can have your program
    check for appointments for the current date and display a "tickler"
    if any are found.  Simply include the line "DO checkappts" at the
    desired location in your program (see below for an example).

    Using the Calendar in your programs

    As with the other applications, there are two ways to utilize the
    calendar/appointment tracker. The first is to use SET KEY to
    establish a hot-key so that it can be popped up from anywhere within
    the program.  The following lines added at the top of your program
    configures the F8 key to serve as the hot key and automatically
    checks for appointments for the current day:

    *** Summer '87 syntax                       
    EXTERNAL popdate   && make symbol for linker
    datekey = -7       && hot key: F8           
    SET KEY datekey TO popdate                  
    checkappts()       && anything for today??  

    // Clipper 5.0 syntax  
    #include "inkey.ch"    
    SET KEY K_F8 TO popdate
    checkappts()           

    If you want to use a different hot key, please refer to your Clipper
    manual for a list of INKEY() values.

    The second method is to call the calendar directly.  Refer to the
    Calculator discussion for a sample menu.  However, I recommend using
    SET KEY.

    Clipper 5.0 Notes

    - It is no longer necessary to declare the variable DATEKEY when
      assigning a hot key.
    - It is no longer necessary to declare POPDATE as EXTERNAL, because
      SET KEY will automatically establish a symbol for the function.

See Also: POPCALC() GETDATE() GINKEY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson