I think a better solution (for my situation anyway) would be to see if any moves were made durin the tool change stop.
If no moves were made, then don't do anything. No need to move to safe z.
As I have a lot of production jobs that use a single tool, the first run of the day requires me to verify tool and alignment. After that, I just want to run. The tool change stop just means that I have to hit start twice and walk away after loading the jig. As x,y, and z are not touched between runs, there is no need to move to safe z.
I don't have time now to write the M6end macro changes but basically another IF statement at the top to test if the Start X,Y,Z a,b,c are equal to the current X,Y,Z,a,b,c. If they are not equal then run the rest of the macro. If they are equal then no need to do anything so just exit.
I'll work out the code when I get some time. It's been a crazy week here.
Ted