Well, I've had an interesting experience with all this. I have a SmoothStepper. I started experimenting with Noise numbers in SS setup. If I got the Home number over about 350, the Z homing routine would go right past the switch, headed for THE END if not for eStop hit!! At about 250 is seems OK. Much lower and the switch jitters after in comes off home and trips an estop, stopping the homing routine.
So.....I edited the Ref All button per Hood's VB. Worked great. Got cocky, added moves to X and Y, too. That worked fine also. Then I started with the SS Noise editing and a couple times quiting Mach, SS didn't unload the firmware and had to be unplugged/plugged. Got the noise number where the home worked pretty good, but then the button script won't work anymore!! I edited all the stuff out except for the original DoButton calls. Edited back in the move off stuff, won't work. Copied old HiddenScript.m1s file, which APPEARS to be where the button script is stored. Edited in again, won't run. I rebooted the computer, everything I could think of. The added text is in the editor window, but it won't run. What did I hose up now that the VB button script won't run? It homes fine without it, but I'd like the move off in there if possible, I like that!!