I have a custom dialog with some editboxes and a button.
Then the user click on the button the editboxes should be disabled.
I use this code:
Display Dialog: DLLVisual, wait for dialog to return (modal)
if Variable CHOICE Equals LOGIN
editbox1.enabled := false >> here I need some help
end
One more question:
The dialog is not complete then the user click on the button. It must wait for the user to click Next.
Is my code above correct?
Take a look at attachment.
Here is what I want:
1)User select ClientId,Access code
2)Click Login
3)disable ClientId,Access code enable Store
4)select Store
5)Click Next
Jørgen
File Attached:
wiz.jpg
Custom dialog with button should disable some controls
I have updated my question (loop,text and DLL result)
I have some questions.
Her is my code with comments:
Question 1
How can I make a loop.
I want to be able to click on the loginbutton check the result and if the result is not ok the user should be able to change values and try again
Question 2
How do I update the enabled state and text values on my form?
Question 3
Can I have text as resultvalues from Call DLL Function?
File Attached:
wiz.jpg
Her is my code with comments:
Code: Select all
Apply Install (get result into variable SUCCESS)
if Variable SUCCESS not Equals ERROR
if Variable SUCCESS not Equals CANCEL
Set Variable ISLOGIN to False
Set Variable ACCESSCODE to
Set Variable STORES to
Set Variable CLIENTID to aa
Set Variable ARESULT to False
//Getting a text value from a DLL
//The dll creates a INI file with the test value
//Can this be done simpler?
Call DLL Function $SUPPORTDIR$\\testdll.dll->GETCLIENTID (get result into variable ARESULT)
Get INI $TARGETDIR$\\TMPFILE.ini, [SECTION] CLIENTID Value into Variable CLIENTID
//Showing my custom form
Display Dialog: DLLVisual, wait for dialog to return (modal)
//The user Click on LOGIN
if Variable CHOICE Equals LOGIN
Call DLL Function $SUPPORTDIR$\\testdll.dll->LOGIN (get result into variable ISLOGIN)
if Variable ISLOGIN Equals TRUE
//Getting values for a dropdown list
Call DLL Function $SUPPORTDIR$\\testdll.dll->GETSTORES (get result into variable ARESULT)
Get INI $TARGETDIR$\\TMPFILE.ini, [SECTION] STORES Value into Variable STORES
Set Variable EDTSTATE to LOGIN
//Updating the dialog
Display Dialog: DLLVisual, wait for dialog to return (modal)
else
end
end
//If everything is OK do this
Set Variable DLLRESULT to false
Call DLL Function $SUPPORTDIR$\\testdll.dll->CreateINI (get result into variable DLLRESULT)
if Variable DLLRESULT not Equals TRUE
Set Variable REMOVE to TRUE
Apply Uninstall (get result into variable SUCCESS)
else
if Variable SUCCESS not Equals CANCEL
Run Program $SUPPORTDIR$\\TestAppMan.exe "$TARGETDIR$" (WAIT)
Run Program $SUPPORTDIR$\\TestApp.exe "$TARGETDIR$" (WAIT)
end
end
end
end
How can I make a loop.
I want to be able to click on the loginbutton check the result and if the result is not ok the user should be able to change values and try again
Question 2
How do I update the enabled state and text values on my form?
Question 3
Can I have text as resultvalues from Call DLL Function?
File Attached:
wiz.jpg
some changes
I have tried to change my code to this:
Most of it works, but I don't know if everything is correct done.
This doesn't work:
I call Display Dialog twice
If I click Cancel the second time the setup stop working.
(I still want answers from my previous post)
Jørgen
Code: Select all
label: DOLOGIN
Set Variable DOUNINSTALL to False
Set Variable STORE to
if Variable SUCCESS not Equals ERROR
if Variable SUCCESS not Equals CANCEL
Set Variable ISLOGIN to False
Set Variable ACCESSCODE to
Set Variable STORES to
Set Variable CLIENTID to aa
Set Variable ARESULT to False
Call DLL Function $SUPPORTDIR$\\testdll.dll->GETCLIENTID (get result into variable ARESULT)
Get INI $TARGETDIR$\\TMPFILE.ini, [SECTION] CLIENTID Value into Variable CLIENTID
Display Dialog: DLLVisual, wait for dialog to return (modal)
if Variable CHOICE Equals LOGIN
Call DLL Function $SUPPORTDIR$\\testdll.dll->LOGIN (get result into variable ISLOGIN)
if Variable ISLOGIN Equals TRUE
Set Variable EDTSTATE to LOGIN
Call DLL Function $SUPPORTDIR$\\testdll.dll->GETSTORES (get result into variable ARESULT)
Get INI $TARGETDIR$\\TMPFILE.ini, [SECTION] STORES Value into Variable STORES
Display Dialog: DLLVisual, wait for dialog to return (modal)
if Variable CHOICE Equals CANCEL
Set Variable DOUNINSTALL to True
end
else
GoTo Label: DOLOGIN
end
end
end
end
if Variable STORE not Equals
if Variable SUCCESS not Equals ERROR
if Variable SUCCESS not Equals CANCEL
Set Variable DLLRESULT to false
Call DLL Function $SUPPORTDIR$\\testdll.dll->CreateINI (get result into variable DLLRESULT)
if Variable DLLRESULT not Equals TRUE
Set Variable DOUNINSTALL to True
else
if Variable SUCCESS not Equals CANCEL
Run Program $SUPPORTDIR$\\TestAppMan.exe "$TARGETDIR$" (WAIT)
Run Program $SUPPORTDIR$\\TestApp.exe "$TARGETDIR$" (WAIT)
end
end
end
end
end
if Variable DOUNINSTALL Equals True
Set Variable REMOVE to TRUE
Apply Uninstall (get result into variable SUCCESS)
endMost of it works, but I don't know if everything is correct done.
This doesn't work:
I call Display Dialog twice
If I click Cancel the second time the setup stop working.
(I still want answers from my previous post)
Jørgen
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
You cannot directly set control properties from the script. However, you can set variables. So, a standard trick that is used in InstallAware themes, as well as other dialogs, is to:
1. Add a hidden label to a form
2. Set its caption to a $VARIABLE$
3. Author dialog rules based on the caption of the label
4. Set the values of the VARIABLE from script before showing the dialog
1. Add a hidden label to a form
2. Set its caption to a $VARIABLE$
3. Author dialog rules based on the caption of the label
4. Set the values of the VARIABLE from script before showing the dialog
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Update the form controls
I did as you have described in your post.
I question is:
If I have a button on the form that do something is this the correct implementation:
Display Dialog: DLLVisual, wait for dialog to return (modal)
if Variable CHOICE Equals LOGIN //the user press the LOGIN button
Set Variable ISLOGIN to True
Display Dialog: DLLVisual, wait for dialog to return (modal) //update visual appearance
Jørgen
I question is:
If I have a button on the form that do something is this the correct implementation:
Display Dialog: DLLVisual, wait for dialog to return (modal)
if Variable CHOICE Equals LOGIN //the user press the LOGIN button
Set Variable ISLOGIN to True
Display Dialog: DLLVisual, wait for dialog to return (modal) //update visual appearance
Jørgen
-
MichaelNesmith
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:

