|
|
#1 |
|
Junior Member
Join Date: Jan 2003
Location: The Netherlands
Posts: 24
|
Hi,
I have 2 textfields on a custom page. One of them needs to be filled in, but not both. How to prevent going to the next page when a) nothing is filled in b) both are filled in c) finally detect which one is filled in? I've tried a lot things..but can't figure it out. Greetz! |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
There is currently no other option than checking the INI file after IO exits and call it again if needed.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Mar 2003
Location: India
Posts: 22
|
I need to insert a custom page which should have a text box to get a key value this i am trying out to have a license module like. So can some body say what is the procedure to insert a custom page. I checked a lot but confussed. So if any one can provide me step by step action i will be very thankful to u.
|
|
|
|
|
|
#4 |
|
Major Dude
|
Please attach the script file.
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Mar 2003
Location: India
Posts: 22
|
With the help of the examples now i got inserted a page and placed 3 text boxes in it also but where will the values entered will be stored, how can i access the value and one more i want to control the textbox to take not more that five chars. Many thank for u deguix
|
|
|
|
|
|
#6 | |||
|
Major Dude
|
Quote:
Ex.: [Field 7] Type=text Left=10 Right=70 Top=1 Bottom=13 State=C:\Path Quote:
Ex.: ReadINIStr $0 "inifile.ini" "Field 7" "State" Quote:
Ex.: [Field 1] Type=text MaxLen=5 Left=65 Right=108 Top=1 Bottom=13 |
|||
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Mar 2003
Location: India
Posts: 22
|
Is the State path is for the inifile.ini whether its a different file or the same file in which i specified the textboxes
|
|
|
|
|
|
#8 |
|
Major Dude
|
State=C:\Path
This is only an example, can be anything: State=fsdfghsrot348509ue0sjp042q wr a[lfnsçoiuterbtnç odut58ps0948560 This will be show at the text box (or any control, if is a checkbox or radiobutton, will return 1 if enabled and 0 if disabled). |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Mar 2003
Location: India
Posts: 22
|
Well my ini file is named License i made a entry State for my text as State=00000 their and then in my script i ReserveFile License.ini and in .onInit function i use this !insertmacro MUI_INATALLOPTIONS_EXTRACT "License.ini" then in the start of my section i say ReadINIStr $0 "License.ini" "Field 2" "State" and try to display this in a message box but i am getting it empty what could be the problem? I follewed all those previou steps from the example provided with the kit. Sorry for this long definition even i can post my script but its too long.
|
|
|
|
|
|
#10 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
The Modern UI uses the plugins directory.
You should use: !insertmacro MUI_INSTALLOPTIONS_READ $0 "License.ini" "Field 2" "State" instead of ReadINIStr |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Mar 2003
Location: India
Posts: 22
|
Yes i am getting it now but is there any way to set the focus to next text box when the user types more than the maxlen of the textbox. With lots of thanks.
|
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Mar 2003
Location: India
Posts: 22
|
One more question i am calling a C exe from the script how can i set the error flag of the script from C code. Like if i return -1 from the code will it set the error flag of the script
|
|
|
|
|
|
#13 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Nope. You will have to modify the InstallOptions sorce, or use one textbox.
|
|
|
|
|
|
#14 | |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
Quote:
PHP Code:
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|