forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@INPUT

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Sat Jan 08, 2005 4:16 pm    Post subject: @INPUT Reply with quote

How to define @input for non letters input only numbers

its for shutdown timer
Back to top
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Sat Jan 08, 2005 6:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Sat Jan 08, 2005 7:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Sat Jan 08, 2005 8:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Sat Jan 08, 2005 8:34 pm    Post subject: Reply with quote

yee

thanks BOO

Do you live by the sea like in TV serie Pacific Blue...
Back to top
View user's profile Send private message Send e-mail
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Sat Jan 08, 2005 9:14 pm    Post subject: Reply with quote

My pleasure. (I live in Florida near the Gulf Coast...)

Cheers,

- Boo
Back to top
View user's profile Send private message
filip
Valued Contributor
Valued Contributor


Joined: 07 Aug 2004
Posts: 340

PostPosted: Sat Jan 08, 2005 9:42 pm    Post subject: Reply with quote

Today its my birthday can you drink a beer for me by the sea on sandy beach...

Thanks Again...
Back to top
View user's profile Send private message Send e-mail
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Sat Jan 08, 2005 10:01 pm    Post subject: Reply with quote

Happy Birthday, Filip! You got it! Cool
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group