Quote from: Khris on Wed 02/11/2022 10:14:22A Textbox has an OnActivate event that runs when the Enter key is typed. You'll want to also have this function run when the enter button is clicked, so what you need is this (assuming your textbox's script name is txtCode):Code: ags // this is the standard handler for the textbox function txtCode_OnActivate(GUIControl* control) { String code = txtCode.Text; // do something with code here } // use this to handle the enter button (needs to be somewhere below the first function!) function btnEnter_OnClick(GUIControl* control, MouseButton button) { if (button != eMouseLeft) return; // ignore right / middle button txtCode_OnActivate(txtCode); // call textbox handler }
This should work I guess; if not you can also try txtCode_OnActivate(gKeyboard.Controls[txtCode.ID]);
Hello Khris yes this part on Textbox OnActivate with the code is vorking well
Now i need to make the delete and and enter keys on the GUI to work when i click on them


Thanks again for you help