Page 1 of 1 1
Topic Options
#120534 - 2004-06-03 12:11 AM Prompt for input
Porthos Offline
Fresh Scripter

Registered: 2004-06-03
Posts: 6
Hello everyone...would like to say I am new to the world of scripting and KIX.

I was looking for a way to script creation of folders and shares, I think I see how to create the folders and shares...

My question to you all is...IS there a way to prompt the user for the name of the folder and share?

Thanks a million

Top
#120535 - 2004-06-03 12:52 AM Re: Prompt for input
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hi David and welcome to the board.

You could maybe Kludge something together with the GETS, but might be able to use one of the XLS type UDFs.

Please do a search for XLS and or INPUT in the UDF forum and one of those should work for you.

Top
#120536 - 2004-06-03 12:55 PM Re: Prompt for input
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Hi David,

Maybe this peace of code can help you out...

Code:

break on

$f = createobject("KiXtart.Form")

$TextBox1 = $f.TextBox("Fill in foldername",20,20,200,20)

$button1 = $f.Button("Browse",20,80,80,20)
$button1.onclick = "$$TextBox1.Text = Getpath()"

$Button3 = $f.Button("Create",120,80,80,20)
$Button3.onclick = "MD $$textbox1.text " ; or whatever you want...

$f.Show

while $f.Visible
$_ = execute($f.DoEvents)
loop
exit 1

function Getpath()
dim $System, $Dialog, $Path, $
$System = createobject("Kixtart.System")
$Dialog = $System.FolderBrowserDialog()
$Dialog.RootFolder = 17
$ = $Dialog.ShowDialog
$Path = $Dialog.SelectedPath
if not $Path exit 1 endif
$GetPath = $Path
endfunction
Code:
 


It isn't only Kixtart but also Kixforms. You have to download the Kixforms library and register the kixforms dll.
You will find more information about Kixforms at www.kixforms.org



Good luck!
_________________________
Co


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 (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.053 seconds in which 0.027 seconds were spent on a total of 12 queries. Zlib compression enabled.

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