| View previous topic :: View next topic |
| Author |
Message |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Sat Jan 08, 2005 4:16 pm Post subject: @INPUT |
|
|
How to define @input for non letters input only numbers
its for shutdown timer |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sat Jan 08, 2005 6:02 pm Post subject: |
|
|
You can do a repeat ... @input ... until numeric loop, or else you can make your own input function that displays a dialog like @input does, but has a timer that only enables the OK button when the edit element contains a valid number. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Sat Jan 08, 2005 7:08 pm Post subject: |
|
|
i have add
IF @NOT(@NUMERIC(%A))
WARN Wrong input !!! @CR()Please set shutdown timer in valid 24h clock range.
Dialog set,Status1,Wrong input !
else
end
goto evloop
ONE problem:
Is any chance to make exception for ":" |
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Sat Jan 08, 2005 8:15 pm Post subject: |
|
|
Do you mean something like this?
Cheers,
- Boo
| Code: |
%A = @INPUT("Enter a valid 24-hour clock range (example: 23:10):")
%B = %A
%%pos = @POS(:,%A)
if @NOT(@EQUAL(%%pos,0))
%A = @STRDEL(%A,%%pos,%%pos)
if @NOT(@NUMERIC(%A))
WARN Wrong input !!! @CR()Please set shutdown timer in valid 24h clock range!
Dialog set,Status1,Wrong input !
else
Info You entered the following valid 24-hour clock range: %B.
end
else
WARN You did not enter a valid 24-hour clock range!
end
goto evloop
|
|
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Sat Jan 08, 2005 8:34 pm Post subject: |
|
|
yee
thanks BOO
Do you live by the sea like in TV serie Pacific Blue... |
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Sat Jan 08, 2005 9:14 pm Post subject: |
|
|
My pleasure. (I live in Florida near the Gulf Coast...)
Cheers,
- Boo |
|
| Back to top |
|
 |
filip Valued Contributor


Joined: 07 Aug 2004 Posts: 340
|
Posted: Sat Jan 08, 2005 9:42 pm Post subject: |
|
|
Today its my birthday can you drink a beer for me by the sea on sandy beach...
Thanks Again... |
|
| Back to top |
|
 |
Boo Valued Contributor


Joined: 31 Oct 2003 Posts: 599 Location: Gulf Breeze, Florida USA
|
Posted: Sat Jan 08, 2005 10:01 pm Post subject: |
|
|
Happy Birthday, Filip! You got it!  |
|
| Back to top |
|
 |
|