Xandy 251 Report post Posted January 15, 2016 (edited) I'm making a chat dialog and to close it I want to use Escape.During the phase where I collect info to be used as chat. If I use GuiCtrlCreateEdit() my script will crash when I press Escape. Bare in mind the Edit also has focus.If I use GuiCtrlCreateInput to capture User input there is no crash on Escape. I'm sure GuiCtrlCreateEdit works fine in most scripts.My problem is probably my environment is using DLLs and EnvSet("SDL_WINDOWID", $ghGui).When I have the EnvSet my error log report is garbled, and when my EnvSet is not set there is no crash.Anyhow I don't like the GuiCtrlCreateInput() when I read from it while the User inputs it only returns one last char. So then I'd need to figure out when any key was down append and output. I really don't want to do it that way. Maybe I'll learn more about that and find it's the way to go. Hmm maybe it has something to do with a cursor for the Input is changing when I read it?; In declaration either $gChat_window_edit= GUICtrlCreateInput("", 15, -200, 200, 50) ; or $gChat_window_edit= GUICtrlCreateEdit("", 15, -200, 200, 50); in the chat_console() Local $text = GUICtrlRead($gChat_window_edit) print2("Chat: " & $text, $gChat_window_surf, 1, 1)Input Example: abc Does anyone know a way to disable the Escape key code in variable GuiCtrlCreateEdit() returns? I tried ws_toolbar I think it was called didn't work still crashed on EscapePerhaps a different control suggestion.Here is a picture with the Edit control, but remember it crashes on Escape key down.*****************************************************************************************************************************************************************************EDIT: I was able to solve this using an Input field and: ControlSend($ghGUI, "", $gChat_window_edit, "{end}") after I focused the Input control. *I would still be interested if anyone can give me information about this issue. ******************************************************************************************************************************************************************************If seeing exactly what I'm doing helps, please have a look.http://songersoft.com/graphics/forum/guictrledit/Map_Editor.zipand here's a video with an example of both Input and Edit Controls: Edited January 16, 2016 by Xandy (-_-) Xandy About (^o^) Discord - Xandy Programmer Share this post Link to post Share on other sites