Probably not. Even if you could program, Audacity doesn’t apply filters, effects, or tools in real time. It only does three things in real time: record, play, and timer. Everything else is post production.
Maybe a label track is what you need. It’s fairly simple to add labels during playback. You can edit them afterwards and export them in different files. However, I don’t think that this will work during the recording itself, at least not without pausing the recording.
Firstly, make yourself familiar with the usage of label tracks. If If you successfully can add labels during the playback, you can try it during recording mode.
Presumably you will have to pause the recording, add a label and resume the recording.
If these cuts should be made quite fast, you may consider using an external program for creating (or recording) key macros. In this way, you could define a key combination that would execute a serie of key (or mouse) commands, one shortly after the other.
Labels can be added during recording using Ctrl+M (Command+M Mac OS X).
The labelled sections can be exported as separate files when the recording is Stopped (not Paused) using Export Multiple http://manual.audacityteam.org/o/man/export_multiple.html