PDA

View Full Version : How do I...?



NewsArchive
01-22-2005, 08:10 AM
[Friday, January 14, 2005 8:08 AM]

I thought I'd pose this question to you all in case one of you has an idea,
and can save Friedrich some time answering my queries!

What I want to do is check that a condition is met - that a filename
provided in a 'Location Dialog' contains a certain word - as soon as the
'Next' button is clicked, and if not show a message box with an alert then
and there. When 'OK' is clicked on the message box the user is returned to
the same 'Location Dialog' to input the correct data.

Cheers for any help,
Kyle

NewsArchive
01-22-2005, 08:10 AM
[Friday, January 14, 2005 2:44 PM]

Kyle,

Please try the following (or use see attached 5.0.1014 script). If the
filename does not include 'USA' it shows a message box with an alert and
then the user is returned to the same 'Location Dialog' to input the correct
data.

-----

! Wizard dialog definition(s)
Define Wizard Dialog: #1 (Welcome)
Define Wizard Dialog: #2 (Select Install Folder)
Define Wizard Dialog: #3 (Ready to Install)

! The Wizard Loop displays the dialog screens that the user sees in the
installation
Loop Wizard
Handle Wizard Events()
If %_SB_DIALOGID% Equals "2" Then
Set Variable %CHECKVAR% to Upper(%_SB_INSTALLDIR%)
Set Variable %RESULT% to InStr(, %CHECKVAR%, "USA")
If %RESULT% Equals "0" Then
Message Box "Filename does not contain USA! Try again." -- "Error"
Set Focus to Control ID $DESTINATION_EDIT1$
Cycle Loop
End
End
End

-----

Does this help?

Thanks,
Friedrich

--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910