After searching far and wide for a good macro for setting tool heights in the tool table, i cant seem to find anything that suits my needs. I am basically looking for a macro that does what the tool height setter in mach4 does. here is my workflow:

(1) set z 0 on my mill top (i do this is with a probe in the spindle, but could be accomplished many ways)
(2) put the tool height setter on the mill top where i just measured z0
(3) put tool to be measured in spindle and set the tool number so mach3 knows what tool to change the height for in the tool table
(4) hit button for macro that drives the tool into the height setter, automatically sets the tool height in the tool table (this measurement would be the z height measured minus the height of the tool setter)
(5 )z backs off the setter and and is ready for the next tool to be measured.

variables that would need to be predefined:
(A) z plunge feed rate
(B) Height Setting offset (height of the setting off the table)
(C) Height of the retract after tool height is set

Lets assume i already have (1) worked out as setting z zero is easy. any help would be greatly appreciated. i am not a macro programmer in anyway, i am working on a killer screen set right now and this is the only piece i am missing before i give it way.