10
« on: December 20, 2019, 10:20:34 AM »
I also like the multi line MDI as well, but when im doing setups i like to do quick verification as im locating edges and stuff like that. So i also like to have a single line mdi textbox to perform these. We have a Tormach at work and they use a similar type textbox that i can enter a single line and hit enter and the code runs. This is what im trying to acheive.
My idea for the MDI single line textbox has always been that i would type some code into the texbox and ht enter and when i hit enter it will run. If the MDI textbox is empty then nothing happens when i hit enter. I would only like it to be triggered when there is code in the textbox. That was how i planned for not having unwanted enter events. The textbox would only be available in an idle state and not when the machine is running a program. Im sorry i should have prefaced my original post with this information so that people would know what im trying to acheive. Being very new to mach programming and LUA i am really lost at what i can do and how to get it to perform what i need. I used to previously use VB.NET and i really liked that it had event handlers like textbox.on_Enter. It made programming what i want a lot easier.
I have tried to put a simple messagebox() command in the on Modify script of the textbox but have not had success even getting that to run. When i run Mach and type code into the box and hit enter nothing happens. Im having trouble understanding when the on Modify script is triggered. I can get this same code to work if i put it into a button on click script. It will read the textbox text and display it in a messasgebox(), just won't work in the textbox on modify script.