PDA

View Full Version : Selecting a specific File using the Select File Dialog...



NewsArchive
09-10-2005, 05:52 AM
I need the use to be able to select a specific file - and that one only.

How can I do that? For example I need to find 'xyz.dat' and it could be on
any drive or folder......
So, I need the users assistance to locate it but I don't want them selecting
a totally different file.....

--
Paul MacFarlane
American Riviera Software Corp

NewsArchive
09-10-2005, 05:52 AM
Paul,

No problem. Try something like the following:

[ User Interface ]
! Wizard dialog definition(s)
Define Wizard Dialog "#1" (Welcome)
Define Wizard Dialog "#2" (License Agreement)
Define Wizard Dialog "SELECTFILE" (Select File)
Define Wizard Dialog "#4" (Select Install Folder)
Define Wizard Dialog "#5" (Ready to Install)

! The Wizard Loop displays the dialog screens that the user sees in the
! installation

Loop Wizard
Wizard Auto Break
If %_SB_DIALOGID% Equals "$SELECTFILE$" Then
Set Variable %CHECKFILE% to ExtractFile(%MYFILE%)
If %CHECKFILE% Not Equals (Ignore Case) "xyz.dat" Then
Display Message Box "Wrong file. Please select xyz.dat" -- "Error"
Cycle Loop
End
End
End

Does this help (I can send you my test script)?

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
09-12-2005, 12:41 AM
That's great. Just getting into your scripting so you've just enlightened
my understanding 2 fold !

paul macfarlane