Brett,
I only put the 2nd wx.wx.messagebox in there to test with. I will make it loop until the operator puts a number in there, I'm forcing them to set the current tool to the actual tool in turret rather than just assuming the operator will be sure to put the correct tool number in the DRO. This code will run only on the start up.
Speaking of running only 1 time.
I put this in the "First Run PLC Script." It didn't crash and as far as I can tell it didn't alter anything else. Is that okay? Or is there a better way to make something run only on startup? Open to any and all suggestions.
Also, I thought we could use Global Variables (like "testcount" in PLC Script) everywhere, even in a macro. It won't let me.