Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

spreadsheets and apple events

55 views
Skip to first unread message

Steven Ritter

unread,
Aug 4, 1993, 11:48:03 AM8/4/93
to
I am planning to write a tutor for people using spreadsheets (on the
Macintosh). The tutor will run as a separate program from the
spreadsheet, monitoring the
student's actions and correcting the student or offering help when
appropriate.

It seems like the logical way for this to happen is to have the programs
communicate through apple events, if the spreadsheet program can be made
to cooperate. I don't really care what spreadsheet is on the other end
(and I'll write my own if it comes to that), so I'd like to know about
the apple event capabilities of commercial spreadsheets (Excell,
Lotus...anything else I should consider?). Specifically:

1. Can I control the spreadsheet through appleevents? I imagine most
programs have this capability to some extent, but what are the limits?

2. Can I get the spreadsheet to echo user actions to the tutor through
appleevents? Ideally, I'd like to know every time the user selects a
cell or performs any action, but I'll settle for what I can get.

Thanks for any help.

Steve
sri...@cmu.edu
sr...@andrew.cmu.edu



Joel Spolsky

unread,
Aug 15, 1993, 1:07:03 PM8/15/93
to
In article <8gLxcnK00...@andrew.cmu.edu> Steven Ritter <sr...@andrew.cmu.edu> writes:
>I am planning to write a tutor for people using spreadsheets (on the
>Macintosh). The tutor will run as a separate program from the
>spreadsheet, monitoring the
>student's actions and correcting the student or offering help when
>appropriate.
>
>It seems like the logical way for this to happen is to have the programs
>communicate through apple events, if the spreadsheet program can be made
>to cooperate. I don't really care what spreadsheet is on the other end
>(and I'll write my own if it comes to that), so I'd like to know about
>the apple event capabilities of commercial spreadsheets (Excell,
>Lotus...anything else I should consider?). Specifically:
>
>1. Can I control the spreadsheet through appleevents? I imagine most
>programs have this capability to some extent, but what are the limits?

Microsoft Excel 4 supports a wide variety of Apple events, sufficient
for almost anything you would want to do. In the event that Excel does
not provide Apple event support for something you need, you can send an
Apple event containing an embedded macro statement which basically
allows you to do ANYTHING that Excel can do via Apple events.

>2. Can I get the spreadsheet to echo user actions to the tutor through
>appleevents? Ideally, I'd like to know every time the user selects a
>cell or performs any action, but I'll settle for what I can get.


This is a bit harder; you'd have to look at Excel's "ON" macro functions
which will run a macro under certain events. The macro would have to
live in Excel. You would then have to write a function in C or Pascal,
and compile it as a code resource, which would actually send the
apple event back to your tutorial program.

For more information on Excel's Apple events support and on writing
code resources for Excel, see the Excel Software Development Kit,
published by Microsoft Press and available at many bookstores. For more
information on Excel's macro language and the ON functions, see the
Excel documentation or one of many fine Excel macro instruction books
available at bookstores.

--
Joel Spolsky
Program Manager
Microsoft Excel
joe...@microsoft.com

0 new messages