Intercepting print messages
Has anyone ever seen an object capable of intercepting a message to be printed to the Max window and sending it out to the Max world instead? The sort of thing that "error" does, but more general in its application?
I am looking for a similar solution to my problem. I am looking for a way to capture the max window messages to determine if a user has quicktime and java installed. When a user does not have one of these components installed it delivers an error message to the max window. I am looking for a way to have my patch look for this error message and alert the user.
@efortin: wouldn't it be possible to instantiate a QT or Java object using JS scipting and check for errors?
p
@efortin: doesn't [error] object do it for you?
@Patric Delges: Are you saying I should use javascript to check for errors within max? Or use javascript to check the user's file system to check if they have quicktime and java installed?
@Luke Woodbury: I tried using the [error] object thinking it would do what I need but it is not out putting the error messages that are getting to the max window regarding quicktime or java not installed. It is however putting out messages from other objects with errors. I tested it with sending a number box a symbol and it output an error. I believe the problem is that the error that appears in the max window is not associated with any object it it just a general max error. I would love to find a way to catch these max messages as I can see how it would be helpful in other instances as well.
@georghajdu@mac.com Do you want an object that outputs to Max everything sent to any print
object? If so, I think I can whip up a solution in an MXJ. If you need to receive EVERYTHING printed to the Max window (e.g. messages printed directly from some obect) that would be trickier. I have an idea for that too, but it is super crazy and I'm not sure about how to do one step (it would require determining the size of C functions at run-time).
Hi Roth,
I meant to receive EVERYTHING printed to the Max window. I gather this might be a complicated task; otherwise we would have already seen this functionality in Max.
Thanks,
g
You can have a copy of "EVERYTHING printed to the Max window" in your OS' console with this message:; max setmirrortoconsole 1
As all messages are tagged (well, on OSX; I don't know about Win*), you could then analyse the log file (/private/var/log/system.log).
p
Hello Patrick,
Thanks for the useful information.
Georg