Page 1 of 1 1
Topic Options
#210165 - 2015-03-25 09:48 AM User input
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
Hi,

Apologies for the really stupid question. It's been a long while since I last did any kixtart work. I don't know if I'm remembering this correctly but was there a command which will bring up a dialogue box in Windows to accept input from the user (a string of characters) ? I immediately remembered the MessageBox function but then also remembered that this only displays different buttons for the user to click on. Was there one similar to MessageBox but which allows the user to type the answer to a question (for instance) ?

Thanks

Top
#210166 - 2015-03-25 10:13 AM Re: User input [Re: kelp7]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
A real GUI box is not available in kixtart. You can use GET and GETS that both take input from the command line but if you really want a GUI box then you can do this with kixforms.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#210167 - 2015-03-25 10:39 AM Re: User input [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
Don't listen to Mart ;\)
Here's some code:
 Code:
Function InputBox($strPrompt, Optional $strTitle, $strDefaultValue)
  Dim $objSC
  $objSC = CreateObject("ScriptControl")
  $objSC.Language = "VBScript"
  $InputBox = $objSC.Eval('InputBox("'+$strPrompt+'","'+$strTitle+'","'+$strDefaultValue+'")')
EndFunction

$=InputBox("Enter your input","This is a title")
? "You've put in: "+$

Top
#210168 - 2015-03-25 10:47 AM Re: User input [Re: Arend_]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
LOL

Not realy kixtart. You use some VB stuff in your example.


Edited by Mart (2015-03-25 10:49 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#210169 - 2015-03-25 10:48 AM Re: User input [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
Well all the code is native kix ;\)
Top
#210170 - 2015-03-25 11:57 AM Re: User input [Re: Arend_]
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
Excellent \:\) Thanks.... shame Kix doesn't have a small text box like that itself.
Top
#210171 - 2015-03-25 02:39 PM Re: User input [Re: kelp7]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
It does - it's called "kixforms". (www.kixforms.org).

Requires a DLL to be registered, but the power is awesome! It not only provides a GUI, but allows cool things like network Socket communications, timed events, and math functions.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#210172 - 2015-03-25 03:01 PM Re: User input [Re: Glenn Barnas]
kelp7 Offline
Starting to like KiXtart

Registered: 2002-08-12
Posts: 124
Loc: UK
Yep, well aware of Kixforms. I didn't really want to do it that way as it is for such a tiny little script. One question to the user, they enter the relevant info which is stored in a variable. We do one thing with the variable and script ends. Might have been a bit bloated to use Kixforms.
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
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.059 seconds in which 0.024 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