Way for a script to parse the log?

Is there any way for a script to look through the log for a certain string of text and take action if it finds it?

good question, iam waiting for that answer too, maybe some MT Dev or Expert can give a simple script to do it…
iam waiting… where are you MT? :laughing:

You can print log into array and then extrtact any information you need.
For example (v3.x), extract last log line:

:local tmp [/log print as-value];
:local logLine [:pick $tmp ([:len $tmp]-1)];
:put $logLine;

now you can parse that line

Hi mrz,

I have problem to applied your example.

When i copy paste the script to my console, i get error.

[admin@Crypto] > :local tmp [/log print as-value];
[admin@Crypto] > :local logLine [:pick $tmp ([:len $tmp]-1)];
syntax error (line 1 column 24)
[admin@Crypto] > :put $logLine;
syntax error (line 1 column 7)

I use v3.2

thanks

you get error because you must run it as a script or put all code in { } when typing in console.