Page 1 of 1 1
Topic Options
#205476 - 2012-07-23 04:23 PM Simple Script
GeorgeLittle Offline
Fresh Scripter

Registered: 2011-02-08
Posts: 47
Loc: UK
Hi,

So I want to prompt for user input and then use these to set system variables. How do I prompt for user values without using Kixforms ? How do I trim the first character from the input eg they will input 1234 but I need two variables one with 1234 and 234

Top
#205477 - 2012-07-23 06:18 PM Re: Simple Script [Re: GeorgeLittle]
ChristopheM Offline
Hey THIS is FUN
*****

Registered: 2002-05-13
Posts: 311
Loc: STRASBOURG, France
here is something very simple :
 Code:
dim $input
"type your code : " gets $input
$input=trim($input)

if $input
	"your input           : " $input ?
	"your input truncated : " right( $input, -1) ?
else
	"your input is empty" ?
endif


i just added trim to prevent from input with blank at the beginning or the end of the string.
_________________________
Christophe

Top
#205478 - 2012-07-23 10:57 PM Re: Simple Script [Re: ChristopheM]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
As well as the UDF, Inputbox() -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=197076

How to use UDFs -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=81943#Post81943

The rest of the UDFs are here -
http://www.kixtart.org/forums/ubbthreads.php?ubb=postlist&Board=7&page=1

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 793 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.026 seconds in which 0.013 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org