OK. I've finally had time to set everything up and it seems to be working, though not efficiently due to the posted after effects script issue.

Here's what I wanted to do: use a midi controller for color correction or other effects tweaking.

1. I've set up a midi controller in Max/Msp. It registers the knob turns and writes the parameters to a file.
2. I've set up After Effects to read the contents of the file; adjusting the appropriate parameters of the effect.

Now, as I mentioned before, the problem is not that after effects is not reading the file, it's that it's not updating the viewer, unless you move to a next frame (or previous, generally one that has not been processed yet and is thus not cached)

As a work-around, I'm triggering an AppleScript from Max/Msp which sends after effects the following 'key presses': [ to place the layer in-point at the current time. This seems to re-evaluate the script, reading in the new values. Works wonderfully.

This of course is problematic, as it means it would only allow for an effect to be changed at the in-point of a layer, an not at another point in time, as the AppleScript would effectively move the layer...

To circumvent this, I've used the 'KeyEd Up' script to remap the keyboard shortcut for 'undo previous action' (applescript can't apparently not send the keycode for command-z or any command-combo shortcuts). This works aswell, as I see the layer jump back and forth when turning a knob on the midi controller.

The main issue now is speed... as the moving of the layer and the subsequent undo action takes up too much time it becomes much less intuitive. So the question remains, but might be clearer now, which other possible commands would force after effects to re-evaluate the expression and not show the cached image...???
Purge-all does not seem to have any effect whatsoever, as does disabling 'use disk cache' in the preferences...