GUICtrlSetLimit's default maximum is 32767. Is it WINTEXTBUFFER? In any case, the following don't work: GUICtrlSetLimit(-1, default, 1) GUICtrlSetLimit(-1, WINTEXTBUFFER, 1) See the following for WINTEXTBUFFER: