tapping into finder events

Randall Lee Reetz randall at randallreetz.com
Mon Jan 7 22:45:06 EST 2008


OK,

This is a big (potentially confusing) question.  I need a way to get
system/finder event notifications sent to Rev or another XCard
stack... as they happen.  The events I want instant notification of
are: new, delete, duplicate, move, rename, edit and alias of
document, application, folder, mount/unmount volume/network, and
launch (with document) and quit application.  I work in the Max OS X
environment mostly.

Before anyone responds, let me clarify that I am not interested in
periodic search and compare methods... meaning I do not find it
efficient to go looking for disc level file structure changes.... I
need them as they happen, and I need notification (and delta data...
what, how, when, where, how much, how many) exactly when and only
when they happen.

Can you imagine the automation one could script if system and finder
level events were sent to an XTalk stack?

Another requirement is the ability to set preferences on the fly from
my stack.  This is so that my stack can efficiently ask for only
those system level events necessary for the task at hand.  There are
hundreds of events in the main and auxiliary system event loops.  The
above list is purposely limited to file system events commonly
available and experienced by the user.  There are many more system
level events that may or may not be useful to a given script writer.
But even my limited list is overkill for some tasks that may only
need to pay attention to one or two event types.

It would be useful (for performance reasons) to turn the whole
mechanism off and on by script as well.

Any ideas?  The AppleEvents architecture would be idea for this...
but sadly, apple does not make the Finder AppleEvent compliant (it
doesn't send events).  ??????

I am sure some of Apple's resistance to do the obvious right thing
has to do with security issues... I can see how bad people could
build bots at will... but I am not one of them, and I think the
productivity and organizational benefits would far outweigh the
security threats.  Automation could be to the 2000's what direct
manipulation was to 1980's.


Randall



More information about the use-livecode mailing list