Changing network Location and applescript?


Greetings all..

I want to do the following:

When a users selects a new network "Location" from the Apple menu, I want to have a script run to do some other tasks. (ie: change the netinfo database, files, NFS Mounts, etc..)

Obviously Shell scripts can't be launched. But it would seem that I might be able to have the menu trigger an applescript event.. (?) I don't know enough about applescript or the Mac environment, really..

Is this the correct way about it? Or should I write an application to do this separately..