DazTheGas has also published a tool change script.
Video
https://www.youtube.com/watch?v=m1eMEec0N-EScript text
http://www.machsupport.com/forum/index.php?topic=31032.0;wap2A difference is that DazTheGas uses the tool length stored in mc.MTOOL_MILL_HEIGHT to pre-position the new tool to minimize probing time.
The Artsoft video stores the Z coordinate from probing in that variable. It's not referenced elsewhere in the script so it's not obvious why.
DazTheGas detects if a zero length is in the tool table with 'if toollen == 0'.
However this can fail because a tiny, but not quite zero, value floating point value is sometimes returned for a zero tool length.
Changing to 'if toollen < 0.01' fixes that problem.
The Tool Change LED flashes when M6 is called but the LED is not addressed in the script. I'm curious about what piece of code does that. Is it accessible and are there other hidden functions?