Hi guys! Need a condition that only allows the input of numbers and a condition that only allows the input of words. Or numbers or words. Help me, please!
TextBox1.Text="asdfghjkl";
TextBox1.Text="123456789";
There's nothing built-in, but validating this type of input is really simple:
function TextBox1_OnActivate()
{
String text = TextBox1.Text;
int i = 0;
while (i < text.Length)
{
if ((text.Chars[i] >= '0') && (text.Chars[i] <= '9')) // TODO: optionally check for decimal or thousands separators
{
// text is a valid number...
}
else
{
// text is not a number!
TextBox1.Text = "";
Display("Please enter a number! Value entered was \"%s\".", text);
}
i++;
}
}
Don't work!
k
You need to elaborate on how it "doesn't work", otherwise we cannot help much by blind guessing.
One common problem people having is you cannot just type the codes in the script to make them automagically work. You need to link the functions to certain events. In this case, the On_Activate event of the Textbox, as illustrated by the following figure.
[imgzoom]http://i488.photobucket.com/albums/rr249/gilbot/tb_events_zps3d9c2234.png[/imgzoom]
First, click the Event icon (the lightning icon) of the Textbox's Property window. Then, click the '...' icon of the On_Activate event and a new function will be created in the script. You may then copy or type the codes of this function's body.
Iceboty V7000a - you really do not understand what is not working? In the event that after you enter all the code works not make sense. the desired effect can be achieved function function repeatedly_execute() ,but because it did not particularly want to load the project and therefore advised to use the optional GUI with buttons to enter numbers, but just wanted to Inventive Mind differently will review my version
new Global variables
int fcode - makes faster code
int strorint - choice of input numbers or text
function repeatedly_execute() {
String text = TextBox1.Text;
if (text.Length != fcode){
// strorint is 0 then enter the text (not numbers), 1 then the numbers
int i = 0;
while (i < text.Length)
{
if ((strorint==0) && (text.Chars[i] >= '0') && (text.Chars[i] <= '9')){
text = text.Truncate(i);
TextBox1.Text = text;
}
else if ((strorint==1) && !((text.Chars[i] >= '0') && (text.Chars[i] <= '9'))){
text = text.Truncate(i);
TextBox1.Text = text;
}
i++;
}
fcode=text.Length;
}
if (IsGamePaused() == 1) return; //Only indication the line before which to insert the code
AlienCap, I must insist that you stop giving programming advice. What you are suggesting to do is wrong. This is not the proper way for things to be done in AGS: it unnecessarily clutters the repeatedly_execute function when there are specialized events, it requires additional polling of variables in memory thereby making the code less efficient, and what's more is that it doesn't even work properly.
You are attempting to use brute force to manipulate the TextBox text, but this does nothing to prevent other code from changing the property to an invalid value. So long as the length of the string is maintained then your code does not attempt to validate the text. What's more is that you are changing the length of the string inside of a loop that uses its own length as a terminating value - that's day one bad programming style. And although you're putting forward a good effort to make it look as though you're validating only the newly input bit of the string, you always begin parsing the string from the beginning, which is the least efficient way for you to parse it. You're using an integer to store a boolean value, which isn't inherently bad on its own, but especially on top of everything else it makes your code less readable. Adding to this unreadable mess, you are using the not operator on a pair of conditions instead of switching the inequality operators.
And you're missing a closing brace in your example.
STOP POSTING CODE AS "HELPFUL" ADVICE. YOU ARE WRONG.
ñðòÃ'ÂÃ' Ã¿ÃµÃ'â,¬ÃµÃºÃ»Ã°Ã´Ã°Ã'‡Ã¾Ã¼, Ã'‚ø üõýõ ÷ðôþòñðò, Ã'‰Ã¾ Ã'†Ãµ Ã'‚ø üõýÃ'â€" òøÿðÃ'â,¬Ã'ŽÃ'â€Ã'ˆ,
ÿþ ÿõÃ'â,¬Ã'ˆÃµ úþô Ã'â,¬Ã¾Ã±Ã¾Ã'‡Ã¸Ã¹
ÿþ ôÃ'â,¬Ã'Æ'óõ Ã'‚ðü òÃ'Âõ ÿÃ'â,¬Ã°Ã²Ã¸Ã»Ã'Å'ýþ, Ã' Ã²Ã¸ÃºÃ¾Ã'â,¬Ã¸Ã'ÂÃ'‚þòÃ'Æ'Ã'Ž þÃ'ÂþñûøòþÃ'ÂÃ'‚Ã'â€" úþüðýô ýð Ã'ÂòþÃ'Ž úþÃ'â,¬Ã¸Ã'ÂÃ'‚Ã'Å', ýðÃ'‰Ã¾ üõýÃ'â€" Ã'‡ÃµÃºÃ°Ã'‚ø ÿþúø òõÃ'ÂÃ'Å' úþô ÿÃ'â,¬Ã¾Ã²Ã'â€"Ã'â,¬Ã¸Ã'‚Ã'Å'Ã'ÂÃ' ÃºÃ¾Ã»Ã¸ Ã' Ã½Ã°Ã'ˆÃ¾Ã² ÿþüøûúÃ'Æ' ò Ã'ÂÃ'Å'þüÃ'Æ' Ã'‚õúÃ'ÂÃ'‚Ã'â€" úþûø ýðÿÃ'â,¬Ã¸ÃºÃ»Ã°Ã´ Ã' Ã½Ã°Ã¹Ã'ˆÃ'ˆÃ¾Ã² ÿþüøûúÃ'Æ' ýð 4 õûõüõýÃ'‚Ã'â€" üõýÃ'â€" ýõüð Ã'ÂüøÃ'ÂûÃ'Æ' ÿÃ'â,¬Ã¾Ã²Ã'â€"Ã'â,¬Ã'ÂÃ'‚ø ýðÃ'ÂÃ'‚Ã'Æ'ÿýÃ'â€" 20, ð óûþñðûÃ'Å'ýÃ'â€" ֟Ã'â€"ýýÃ'â€" Ã'ÂÃ'‚òþÃ'â,¬Ã¸Ã² Ã'‚þüÃ'Æ' Ã'‰Ã¾ Ã'â,¬Ã¾Ã·Ã'â,¬Ã¾Ã±Ã½Ã¸Ãº úÃ'â,¬Ã¸Ã²Ã¾Ã'â,¬Ã'Æ'úøù Ã'ÂÃ'‚òþÃ'â,¬Ã¸Ã² ôÃ'Æ'öõ üðûþ üþöûøòøÃ'… ÿþôÃ'â€"ù, Ã'‡ÃµÃ'â,¬ÃµÃ· Ã'†Ãµ Ã' Ã·Ã¼Ã'Æ'Ã'ˆÃµÃ½Ã¸Ã¹ Ã'…þÃ'‡ Ã'ÂúþÃ'ÂÃ'Å' þÿÃ'‚øüÃ'â€"÷þòÃ'Æ'òðÃ'‚ø úþô, Ã'†Ã' Ã'„Ã'Æ'ýúÃ'†Ã'â€"Ã' (repeatedly_execute) ÿþòÃ'‚þÃ'â,¬Ã'ŽÃ'â€Ã'‚Ã'Å'Ã'ÂÃ' Ã¿Ã¾Ã'ÂÃ'‚Ã'â€"ùýþ Ã'‚þüÃ'Æ' ÿÃ'â,¬Ã¾Ã'ÂÃ'‚þ ýõþñÃ'…Ã'â€"ôýþ üðÃ'‚ø ֟Ã'â€"ýýÃ'Æ' Ã'Âúð ôþ÷òþûøÃ'‚Ã'Å' þñÃ'â€"ùÃ'‚ø ÿÃ'â,¬Ã¾Ã'†ÃµÃ' Ã¿Ã'â,¬Ã¾Ã²Ã'â€"Ã'â,¬ÃºÃ¸ òòõôõýþóþ úþôð 2 Ã'â,¬Ã°Ã·
Ã'â€" ýõ ñÃ'Æ'Ã'‚Ã'Å' Ã'â€"ôÃ'â€"þÃ'‚þü, Ã'‰Ã¾ Ã'†Ãµ Ã' Ã'‚ðú ýÃ'â€"ñø ÿÃ'â,¬Ã¾Ã¿Ã'Æ'Ã'ÂÃ'‚øò, ôûÃ' Ã'‚þóþ Ã'‰Ã¾Ã± ýõ ÷ðúÃ'â,¬Ã¸Ã'‚ø Ã'ÂðüþüÃ'Æ' Ã'„Ã'Æ'ýúÃ'†Ã'â€"Ã'Ž Ã'‚Ã'â,¬ÃµÃ±Ã° ñÃ'Æ'Ã'‚ø ÿþòýøü Ã'â€"üñÃ'â€"Ã'†Ã¸Ã»Ã¾Ã¼
Ã'â€" ÿõÃ'â,¬Ã'ˆÃµ ýÃ'â€"ö úð÷ðÃ'‚ø Ã'‰Ã¾ Ã' Ã½Ãµ ÿÃ'â,¬Ã°Ã²Ã¸Ã¹, ò Ã'‚õñõ ò÷ðóðûÃ'â€" úþô ñõ÷ÿþûÃ'â€Ã·Ã½Ã¸Ã¹ Ã'‡ÃµÃ'â,¬ÃµÃ· òøúþÃ'â,¬Ã¸Ã'ÂÃ'‚ðýýÃ' Ã'„Ã'Æ'ýúÃ'†Ã'â€"Ã'â€" OnActivate, Ã' ÃºÃ° ÿþ Ã'ÂÃ'Æ'Ã'‚Ã'â€" Ã'‚Ã'â€"úø Ã'Âú ýðöüõÃ'ˆ õýÃ'‚Ã'â,¬ Ã'ÂÿÃ'â,¬Ã°Ã'†Ã'ŽÃ'â€, Ã'†Ãµ Ã'Âú ÿûðÃ'ÂÃ'‚õÃ'â,¬Ã¾Ã¼ ÿÃ'â,¬Ã¾Ã'‚Ã'â€"Ã'‡ÃºÃ'Æ' ò Ã'ˆÃ»Ã'ŽÃ±Ã'†Ã'â€" ÷ðúûõÃ'ŽÃ²Ã°Ã'‚ø, Ã'‚þñÃ'â€"ö ýðÿøÃ'Âðûø Ã'‰Ã¾ Ã'‚Ã'â,¬ÃµÃ±Ã° Ã'‰Ã¾Ã± òòþôøòÃ'ÂÃ' Ã'‚Ã'â€"úø Ã'‚õúÃ'ÂÃ'‚ Ã'‡Ã¸ ñÃ'Æ'úòø, þôøý Ã'â,¬ÃµÃ·Ã'Æ'ûÃ'Å'Ã'‚ðÃ'‚ úÃ'â€"ýÃ'†ÃµÃ²Ã¸Ã¹ Ã'†Ãµ ýõ Ã'‚õö Ã'Âðüõ Ã'‰Ã¾ Ã'â€" ÿÃ'â,¬Ã°Ã²Ã¸Ã»Ã'Å'ýøù Ã'ˆÃ»Ã'ÂÃ'…
Ã'‚ð Ã'â€" Ã'‚ø ôÃ'â€"Ã'ÂÃ'‚ðò üõýõ þñòøýÃ'Æ'òðÃ'‡Ã'Æ'òðÃ'‚ø, Ã'Âö þñÃ'ÂÃ'Âýøò ÿõÃ'â,¬ÃµÃ´ úþôþü ÿøÃ'ˆÃ'Æ' Ã'‚ðú Ã'‚Ã'â€"ûÃ'Å'úø Ã'‡ÃµÃ'â,¬ÃµÃ· Ã'‚òþÃ'Ž ýõÿÃ'â,¬Ã¾Ã´Ã'Æ'üðýÃ'Æ' ÿþÃ'â,¬Ã°Ã´Ã'Æ', Ã' Ã´ÃµÃ'ÂÃ'Å' 2 Ã'‚øöýÃ'â€" óþòþÃ'â,¬Ã¸Ã² Ã'‰Ã¾ üþöõ ûÃ'â€"ÿÃ'ˆÃµ óÃ'Æ'Ã'â€" òøúþÃ'â,¬Ã¸Ã'ÂÃ'‚þòÃ'Æ'òðÃ'‚ø ôûÃ' Ã¼ÃµÃ½Ã'Å'Ã'ˆÃ¾Ã'â€" ýðóÃ'â,¬Ã'Æ'÷úø, Ã'‚ð Ã'â€" Ã'‚ðúøù úþô Ã'ÂÃ'‚òþÃ'â,¬Ã'ŽÃ'†Ã'â,¬Ã¾Ã·Ã'â,¬Ã¾Ã±Ã½Ã¸Ãº ÿÃ'â,¬Ã¾Ã³Ã'â,¬Ã°Ã¼Ã¸ ð ýõ Ã'Â, Ã'ÂúÃ'‰Ã¾ Ã'†Ã²Ã°Ã'â,¬Ã'â€"ðýÃ'‚ Ã'‰Ã¾ ÿÃ'â,¬Ã°Ã'†Ã'ŽÃ²Ã°Ã'‚øüõ ÿþûÃ'â€"ÿÃ'ˆÃµ üþóþ Ã'‚þ Ã'‡Ã¾Ã¼Ã'Æ'ö ýõ ýðÿøÃ'Âðò ùþóþ, Ã'‚þù úþô Ã'‰Ã¾ Ã'‚ø ýðÿøÃ'Âðò, òÃ'â€"ý ÷þòÃ'ÂÃ'â€"ü ýõ ÿÃ'â,¬Ã°ÃºÃ'‚øÃ'‡Ã½Ã¸Ã¹, ñðóðÃ'‚þ ûøÃ'ˆÃ½Ã'â€"Ã'… ôÃ'â€"ù, Ã'‚ðù ýðúÃ'â€"ýõÃ'†Ã'Å'Ã'‚þ ÿõÃ'â,¬ÃµÃ¿Ã¸Ã'‚Ã'Æ'ù ÿõÃ'â,¬ÃµÃ´ ÿþÃ'â,¬Ã°Ã´Ã°Ã¼Ã¸ Ã'‡Ã¾Ã³Ã¾ úþýúÃ'â,¬ÃµÃ'‚Ã'â,¬Ã¾ ò Ã'†Ã'Å'þüÃ'Æ' úþôÃ'â€" Ã'‚Ã'â,¬ÃµÃ±Ã° ôþÃ'ÂÃ'ÂóýÃ'Æ'Ã'‚ø
Ã'â€" ÿõÃ'â,¬Ã'ˆ ýÃ'â€"ö üõýõ þñòøÃ'‚Ã'Æ'òðÃ'‡ÃºÃ²Ã°Ã'‚ø, Ã'‚ø Ã'â,¬Ã¾Ã±Ã¸Ã'ˆ Ã'‚õö Ã'Âðüõ TextBox1.Text = "";, Ã'‚Ã'â€"ûÃ'Å'úø ñÃ'â€"ûÃ'Å' ÿÃ'â,¬Ã¸Ã¼Ã'â€"Ã'‚øòýþ, Ã'‚þüÃ'Æ' Ã'‰Ã¾ ýðòÃ'â€"Ã'‰Ã¾ ÿþ÷ñÃ'Æ'òðÃ'‚øÃ'ÂÃ'Å' òÃ'ÂÃ'Å'þóþ Ã'‚õúÃ'ÂÃ'‚Ã'Æ' úþûø ÷ýðÃ'â€Ã¼Ã¾ üÃ'â€"Ã'ÂÃ'†Ãµ ÿþüøûúø, ýõ úþÃ'â,¬Ã¸Ã'ÂÃ'‚Ã'Æ'òðÃ'‚øÃ'ÂÃ'Å' Ã'†Ã¸Ã¼ Ã'†Ãµ Ã'‚Ã'â,¬Ã°Ã'‚ð Ã'‡Ã°Ã'ÂÃ'Æ' ýð Ã'‡Ã¸Ã'‚ðýýÃ' Ã¿Ã'â,¬Ã¸Ã'Âûðýþóþ úþôÃ'Æ', ñÃ'Æ'ûþ Ã'‚Ã'Æ'Ã'‚ ñÃ'â€"ûÃ'Å'Ã'ˆÃµ úþüðýô Ã' Ã±Ã¸ ÿÃ'â,¬Ã¾Ã'ÂÃ'‚þ òøôðûÃ'Âò ýõÿÃ'â,¬Ã°Ã²Ã¸Ã»Ã'Å'ýøù Ã'Âøüòþû ð ýõ þñÃ'â,¬Ã'â€"÷ðò Ã'‚õúÃ'ÂÃ'‚
Ã'â€" üðòÿð ôûÃ' Ã'‚þóþ Ã'‰Ã¾Ã± Ã' Ã'‚Ã'Æ'Ã'‚ ýõ ôðòðò ÿþÃ'â,¬Ã°Ã´, ôðòðù Ã'Âðü ÿÃ'â,¬Ã¾Ã´Ã'Æ'üðýÃ'â€" ÿþÃ'â,¬Ã°Ã´Ã¸, Ã'Âú Ã' Ã¼Ã°Ã'Ž ýõ ñÃ'â€"Ã'ÂøÃ'‚øÃ'ÂÃ'Å' òÃ'â€"ô Ã'‚òþÃ'â€"Ã'… Ã'ÂûÃ'â€"ò Ã'â€" ÿþÃ'â,¬Ã°Ã´, úþûø Ã'‚ø þñòøýÃ'Æ'òðÃ'‡Ã'Æ'Ã'â€Ã'ˆ ð Ã'Âðü ýÃ'â€"Ã'‡Ã¾Ã³Ã¾ Ã'â,¬Ã¾Ã±Ã¾Ã'‡Ã¾Ã³Ã¾ ýõ ÿÃ'â,¬Ã¾Ã¿Ã¾Ã½Ã'Æ'Ã'â€Ã'ˆ. âð Ã'â€" ýðòÃ'‡Ã¸Ã'ÂÃ'Å' Ã'‡Ã¸Ã'‚ðÃ'‚ø Ã'‚õúÃ'ÂÃ'‚ ÿõÃ'â,¬ÃµÃ´ úþôþü, Ã' Ã¶ ÿþÃ'ÂÃ'Âýøò Ã'‡Ã¾Ã¼Ã'Æ' ýõ Ã'…þÃ'‚Ã'â€"ò Ã'ÂÃ'‚òþÃ'â,¬Ã'ŽÃ²Ã°Ã'‚ø úþô, ð Ã'ÂúÃ'‰Ã¾ ýõ òüÃ'â€"Ã'â€Ã'ˆ Ã'‡Ã¸Ã'‚ðÃ'‚ø Ã'‚õúÃ'ÂÃ'‚ üÃ'â€"ö Ã'â,¬Ã'ÂôúÃ'â€"ò, ÿÃ'â,¬Ã'Âüð üþòð ñÃ'Æ'ôõ Ã'‡Ã°Ã'ÂÃ'‚þ ò þñÃ'â,¬Ã°Ã·Ã»Ã¸Ã²Ã'â€"ù Ã'„þÃ'â,¬Ã¼Ã'â€".
÷ðñÃ'Æ'ò ÿþÃ'ÂÃ'ÂýøÃ'‚ø Ã'‡Ã¾Ã¼Ã'Æ' ýõüð ÿÃ'â,¬Ã¾Ã²Ã'â€"Ã'â,¬ÃºÃ¸ úþûø ÷ñõÃ'â,¬Ã'â€"óðÃ'â€Ã'‚Ã'Å'Ã'ÂÃ' Ã´Ã¾Ã²Ã¶Ã¸Ã½Ã° Ã'â,¬Ã'Âôúð (Ã'…þÃ'‡Ã° ÷ðôÃ'Æ'üÃ'Æ'Ã'ŽÃ'ÂÃ'Å' úþüÃ'Æ' ò÷ðóðûÃ'â€" Ã'‚Ã'â,¬ÃµÃ±Ã° Ã'‚ðúõ ÿþÃ'ÂÃ'ÂýÃ'ŽÃ²Ã°Ã'‚ø), ÿþÃ'‡Ã½ÃµÃ¼ ÷ Ã'‚þóþ Ã'‰Ã¾ Ã'„Ã'Æ'ýúÃ'†Ã'â€"Ã' Ã²Ã¸ÃºÃ¾Ã½Ã'Æ'Ã'†Ã¿Ã¾Ã'ÂÃ'‚Ã'â€"ùýÃ'â€" ÿþòÃ'‚þÃ'â,¬ÃµÃ½Ã½Ã' ÃºÃ¾Ã´Ã'Æ', Ã'‰Ã¾ üðÃ'†Ã'‚õñõ ÷ðÃ'ÂÃ'‚ðòøÃ'‚ø ÷ðôÃ'Æ'üðÃ'‚øÃ'ÂÃ'Å' Ã'Âú þñÃ'â€"ùÃ'‚ø ÿÃ'â,¬Ã¾Ã'†ÃµÃ' Ã¿Ã¾Ã'ÂÃ'‚Ã'â€"ùýøù ÿÃ'â,¬Ã¾Ã'†ÃµÃ' Ã¿ÃµÃ'â,¬Ãµ ÿÃ'â,¬Ã¾Ã²Ã'â€"Ã'â,¬ÃºÃ¸ ÿþòÃ'â€"Ã'â,¬ÃµÃ½Ã¾Ã³Ã¾ òòõôõýþóþ Ã'‚õúÃ'ÂÃ'‚Ã'Æ', ôûÃ' Ã'‚þóþ Ã'â€" ýõþñÃ'…Ã'â€"ôýð ôþôðÃ'‚úþòð ֟Ã'â€"ýýð, Ã'â€"ýðúÃ'ˆÃµ üþöûøòÃ'â€" ýðòÃ'â€"Ã'‚Ã'Å' ÿÃ'â€"ôòøÃ'ÂðýýÃ' Ã'â€" Ã'ÂúÃ'‰Ã¾ Ã'‚ø ÷ðôÃ'Æ'üðÃ'â€Ã'ˆÃ'ÂÃ' Ã'‚þ ÷Ã'â,¬Ã¾Ã·Ã'Æ'üÃ'â€"Ã'â€Ã'ˆ Ã'‰Ã¾ ûÃ'ŽÃ´Ã'ÂÃ'Å'úð Ã'â,¬ÃµÃ°ÃºÃ'†Ã'â€"Ã' Ã½Ãµ ýðÃ'ÂÃ'‚Ã'â€"ûÃ'Å'úø òøÃ'Âþúð Ã'‰Ã¾Ã± òÃ'ÂÃ'‚øóýÃ'Æ'Ã'‚ø ֟Ã'â€"ýøÃ'‚ø ôþòöøýÃ'Æ' Ã'‚õúÃ'ÂÃ'‚þòþóþ Ã'â,¬Ã'Âôúð ôþ ýðÃ'ÂÃ'‚Ã'Æ'ÿýþóþ Ã'†Ã¸ÃºÃ»Ã'Æ' úþôð, ð Ã'Âðü Ã'†Ã'â€"úøû ÿþòÃ'‚þÃ'â,¬Ã'ŽÃ'â€Ã'‚Ã'Å'Ã'ÂÃ' Ã'ÂÃ'‚Ã'â€"úø Ã'â,¬Ã°Ã· Ã'‰Ã¾ Ã'‚ðúð ֟Ã'â€"ýýð ñÃ'â€"ûÃ'Å'Ã'ˆÃµ ýÃ'â€"ö þÿÃ'â,¬Ã°Ã²Ã´Ã'Æ'Ã'†Ã'Âõñõ òþýð ÿÃ'â,¬Ã¾Ã'ÂÃ'‚þ ýõþñÃ'…Ã'â€"ôýð
Ã'â€" Ã' Ã½Ãµ ÷ñøÃ'â,¬Ã°Ã'ŽÃ'ÂÃ'Å' ÿÃ'â€"ôÃ'ÂÃ'‚Ã'â,¬Ã¾Ã'ŽÃ²Ã°Ã'‚øÃ'ÂÃ'Å' ÿÃ'â€"ô ÿþôÃ'â€"Ã'â€" Ã'ÂúÃ'â€" ûøÃ'ˆÃ¸Ã² Ã'â,¬Ã¾Ã·Ã·Ã'â,¬Ã¾Ã±Ã½Ã¸Ãº , ûÃ'â€"ÿÃ'ˆÃµ Ã' ÃºÃ¾Ã´ ÿÃ'â€"ô Ã'Âõñõ ÿÃ'â€"ôÃ'ÂÃ'‚Ã'â,¬Ã¾Ã'Ž ýÃ'â€"ö ñÃ'Æ'ôÃ'Æ' ÷óøñðÃ'‚øÃ'ÂÃ'Å' ÿõÃ'â,¬ÃµÃ´ Ã'‚Ã'â,¬Ã'Æ'ôýþÃ'‰Ã°Ã¼Ã¸ Ã'â€" óþòþÃ'â,¬Ã¸Ã'‚ø Ã'‰Ã¾ Ã'‚ðú Ã'â,¬Ã¾Ã±Ã¸Ã'‚ø ýõ ÿÃ'â,¬Ã°Ã²Ã¸Ã»Ã'Å'ýþ Ã'â€" Ã'â,¬Ã°Ã· Ã'‚ðúõ ýõ ÿÃ'â,¬Ã¾Ã´Ã'Æ'üþòðûþÃ'ÂÃ'Å' Ã'‚þ Ã'‚Ã'â,¬ÃµÃ±Ã° úþÃ'â,¬Ã¸Ã'ÂÃ'‚Ã'Æ'òðÃ'‚øÃ'ÂÃ'Å' Ã'‡Ã°Ã'ÂÃ'‚úþòøü òøÃ'â,¬Ã'â€"Ã'ˆÃµÃ½Ã½Ã'Âü
(Mod hat on)
AlienCap, the language of this forum is English. Since you and IM seem to know each other, if it's easier for you to write in Russian or Ukrainian, why don't you just communicate directly?
That said, from glancing at your code snippets, I don't think monkey's response was appropriate. His code no doubt works perfectly, but as far as I can tell it doesn't actually do what IM was apparently looking for. (It's hard to tell, because as usual Insane Mind didn't properly explain what he was trying to do and where he was failing. However, I took the problem to be how to implement a text box that will not allow you to enter a non-supported character, i.e. it will ignore any other keypresses.) Your code may be flawed, but it does have a good stab at solving the task, and in that it was in fact helpful.
Bravo, Alien Cap!
I put your code in the Global (repeatedly executly) and it works!
Quote from: monkey_05_06 on Thu 22/01/2015 19:21:14
There's nothing built-in, but validating this type of input is really simple:
Thanks! Your code partly helped!
Quote from: Snarky on Sat 24/01/2015 16:30:24
(Mod hat on)
AlienCap, the language of this forum is English. Since you and IM seem to know each other, if it's easier for you to write in Russian or Ukrainian, why don't you just communicate directly?
That said, from glancing at your code snippets, I don't think monkey's response was appropriate. His code no doubt works perfectly, but as far as I can tell it doesn't actually do what IM was apparently looking for. (It's hard to tell, because as usual Insane Mind didn't properly explain what he was trying to do and where he was failing. However, I took the problem to be how to implement a text box that will not allow you to enter a non-supported character, i.e. it will ignore any other keypresses.) Your code may be flawed, but it does have a good stab at solving the task, and in that it was in fact helpful.
I certainly understand but when the soul comes to a boil as much text to check no desire.
And please re ask him what exactly the problem. I always do it.
and if you can explain where in the code the error when I look, I do not see it, if you see an error in the code that I am not a template, and for a specific task you wrote too carped.
and the forum usually get questions for which I have not found a simple solution by using an event or function in the hope that I'm just bad looking in Help. Valid but asks what the problem is, or can not avoid miscommunication