Input solo con números, letras y espacios

Aquí puedes preguntar o compartir tus dudas y conocimientos acerca del programa
Hola gente, de nuevo molestando, quisiera saber como hacer que mi input solo acepte letras, números y espacios, trate de hacerlo en el Script On_Key pero no pude (porque no se jaja)

PD: pude lograr esto con Input Mask pero cuando tomo el texto del input se agregan espacios al final, cosa que no quiero, ya que el texto que obtengo lo posiciono en un Label centrado, si hay alguna forma de borrar estos espacios al final tambien agradeceria :yes:

Desde ya muchas gracias

Input que no acepte Símbolos ni Espacios[SOLUCIONADO]

Busca un hilo con este titulo.

Re:

rafaxplayer escribió:Input que no acepte Símbolos ni Espacios[SOLUCIONADO]

Busca un hilo con este titulo.
Estube leyendo ese post anteriormente, pero la verdad que no me funciona, cuando escribo en el input me aparece:
Error: attempt to compare number with nil

Expon tu código que lo veamos , a lo mejor es fallo tuyo

Re:

rafaxplayer escribió:Expon tu código que lo veamos , a lo mejor es fallo tuyo
+1

aca un ejemplo, si se escriben caracteres raros se borra todo, pero igual no me funciona, me aparece el error ya mencionado

if e_Key < 48 or e_key > 90 then
Input.SetText("Input-Nombre","")
end

Usando el mismo script que el otro tema:
if e_key ~= 8 and e_Key ~= 9 and e_Key ~= 32 then
    if e_Key > 105 then
       if e_Key ~= 144 and e_Key ~= 145 then
          txt = Input.GetText(this);
          Input.SetText(this, txt:sub(1, #txt-1));
          Input.SetSelection(this, #txt, #txt);
       end
    end
else
   txt = Input.GetText(this);
   Input.SetText(this, txt:sub(1, #txt-1));
   Input.SetSelection(this, #txt, #txt);
end
No entiendo porque te da un error :cerrado:

Si lo que quieres es solo borrar los espacios al final:
txt = Input.GetText("Input1");
txt = String.Replace(txt, " ", "");
Input.SetText("Input1", txt);
Suerte con tu proyecto :friends:

De esta forma me anduvo :D
if e_Key ~= 9 then
if e_Key > 105 then
if e_Key ~= 144 and e_Key ~= 145 and e_Key then
txt = Input.GetText(this);
Input.SetText(this, txt:sub(1, #txt-1));
Input.SetSelection(this, #txt, #txt);
end
end
else
txt = Input.GetText(this);
Input.SetText(this, txt:sub(1, #txt-1));
Input.SetSelection(this, #txt, #txt);
end


Aunque todavia se puede escribir un simbolo que desearia sacar, el "|" pero bueno, con esto mucho mejor,
Gracias!!! :friends:

prueva con esto:
if (e_key > 47 and e_key < 91) or e_key == 8 then

provando

Prueba con este:
if e_Key > 47 then
   if (e_Modifiers.shift or e_Modifiers.ctrl or e_Modifiers.alt) and e_Key < 55 then
      txt = Input.GetText(this);
      Input.SetText(this, txt:sub(1, #txt-1));
      Input.SetSelection(this, #txt, #txt);
   elseif e_Key > 105 then
   	  if e_Key > 111 and e_Key < 146 then
   	  else
          txt = Input.GetText(this);
          Input.SetText(this, txt:sub(1, #txt-1));
          Input.SetSelection(this, #txt, #txt);
       end
   end
end
Pero hay un problema con estos símbolos:
~
`
´
¨
^

Imagen