I'm using Afrow UKs script header, Array.nsh. It is very helpful, but I have run into a problem. When using the command:
${myArray->Exists} Value GotoIfExists GotoIfNotExists
and the item does not exist, I get a endless loop lock up. Compile the below code, it should work, and find "SecondItem" in the array. Then change:
${MyArray->Exists} "SecondItem" Label1 Label2
to
${MyArray->Exists} "SecondItemxxx" Label1 Label2
and you should see the problem. It should just goto Label2, when it does not find SecondItemxxx in the array. FYI, I'm using nsis 2.06.
Help! Thanks all.
Jnuw
!include "Array.nsh"
Name "ArrayTest"
OutFile ArrayTest.exe
InstallDir "$EXEDIR"
ShowInstDetails show
${Array} MyArray
Section ""
${MyArray->Init}
${MyArray->Shift} "FirstItem"
${MyArray->Shift} "SecondItem"
${MyArray->Shift} "ThirdItem"
${MyArray->Exists} "SecondItem" Label1 Label2
Label1:
MessageBox MB_OK "Exists"
Goto End
Label2:
MessageBox MB_OK "Not Exists"
End:
SectionEnd