First, thanks for the script, I'm sure going to try it and then add it to the next release! (crediting you of course).
As to that other format, you can actually copy the text right out of Mex3Scriptor. Just select it all (ctrl+a) and copy it (ctrl+c). Voila.
In the script you make the engine search for an 'M' which is not really the way to go. There may be a lot of bytes in a file, and chances are you will stumble upon an M that is just part of something else and not anything related to your header.
I also noticed that you load up a long variable in FILENAME (a variable I would expect to be a string) and Reversing it even and then logging it with the Log command. Do you know I never even tried that? I just assumed my code would not be able to handle that, but it does I noticed from the script you attach above!! LOL! Excellent!

However, I'm pretty sure you can't use a "Math FILENAME += FILEID ;" construction, as the engine has no way to tell whether you wish to append a character to a string, it will just tell you a variable type mismatch occured.
As for the crash, that is bound to happen if you take account the above. Besides that, IF the script finds an M that is not part of the marker, it might be that your FILECNTL gets a number that is completely inappropriate.
Hope that helps.
