Page 1 of 1 1
Topic Options
#180293 - 2007-09-08 10:16 PM Help with script for newbie
thunderchero Offline
Fresh Scripter

Registered: 2007-09-08
Posts: 14
Loc: USA
Hi, I just want to say this is a great site!

I need help, what I am tring to do is make a installer to update a program. I got it working but would like to make it better. I need to ask the person installing update for program where the location of a folder is. so what I need is a script that will bring up a browse for file window from my command prompt then save there choice as a variable.

can anyone help me with this please?

thunderchero

Top
#180297 - 2007-09-09 06:58 AM Re: Help with script for newbie [Re: thunderchero]
NTDOC Administrator Offline
Administrator
*****

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

There are some methods to do it in KiXtart alone but a MUCH better way would be to use KiXforms if possible. KiXforms Website

You can look in the UDF forum and I think maybe on of the Excel type calls might be able to help as well.

Top
#180299 - 2007-09-09 10:56 AM Re: Help with script for newbie [Re: NTDOC]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
You could also use the GUIdialog UDF
The script below works.

 Code:
Break on

$folder = GUIdialog("kix ass")
If @error
	"user pressed cancel"
Else
	?$folder
EndIf

Sleep 5


You should copy the UDF code into the script or put it in a separate file and call it.

GUIDialog() - GUI dialog for selecting folder, file, printer or computer
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#180300 - 2007-09-09 02:15 PM Re: Help with script for newbie [Re: Mart]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
What's so special about this directory that only the end user would know where it is. Can't you use alternative methods to find the directory like check in the registry or a file/folder scan?
_________________________
There are two types of vessels, submarines and targets.

Top
#180301 - 2007-09-09 06:54 PM Re: Help with script for newbie [Re: Sealeopard]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I would never trust users to do things right. There is no end to idiot-proofing or stupidity. I would probably remote control into the PCs before prompting them for input.

Surely, as Jens suggests, there must be a better way.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#180302 - 2007-09-09 07:27 PM Re: Help with script for newbie [Re: Les]
thunderchero Offline
Fresh Scripter

Registered: 2007-09-08
Posts: 14
Loc: USA
Thanks for everyones help I know there is better ways but til I get better at scripting this will do very nicely.

thunderchero

Top
#180303 - 2007-09-09 07:39 PM Re: Help with script for newbie [Re: thunderchero]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You are incorrigible. The GUIDialog() UDF is just the thing for you then.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#180328 - 2007-09-09 11:42 PM Re: Help with script for newbie [Re: Les]
thunderchero Offline
Fresh Scripter

Registered: 2007-09-08
Posts: 14
Loc: USA
Les,

You were right there is an easier way without user interaction by using registry.

thunderchero

Top
Page 1 of 1 1


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

Who's Online
0 registered and 1527 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.048 seconds in which 0.021 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