Archive: Need your help in NSIS


Need your help in NSIS
Hi,
I am still not to understand clearly about NullSoft. When I read help file. I can not see why +2 or +3 except (+1 or +0) :(
I also find information about it but I still can not.
StrCmp $0 "a string" 0 +3
DetailPrint '$$0 == "a string"'
Goto +2
DetailPrint '$$0 != "a string"'
Someone can help me???
I am still find more library about NSIS but I do not see them :(
If you have some document, please share it to me! :)
Big thank you for your gift, :D


What is your problem? I don't clearly understand you. Do you need more information about jumping to labels or what? What is wrong with +1, +0, +2, +3.

If you need advice in conditional logic, have a look at LogicLib.nsh and the examples in the NSIS/Examples directory - LogicLib.nsi. It is more clear to beginners.


You mean relative jupms? :confused: It's all in the NSIS Manual (4.4 Relative Jumps) read also (4.3 Labels) I personally like to use labels instead of relative jumps, but it's not always possible.

Basically the +integer or -integer tells the program to jump on instruction relative to the place they are called from.

StrCmp $0 "a string" 0 +3 ; if register $0 == "a string" jump to 0 (continue normally) 
else jump to the third instruction from this point (skip the DetailPrint and Goto below).

DetailPrint '$$0 == "a string"' ; if the jump was 0 the code will continue normally here.

Goto +2 ; jump to second instruction from this point (skip the DetailPrint)

DetailPrint '$$0 != "a string"' ; if the jump was +3 the code will continue from this point

Thanks,
My problem is not to understand clearly many command on NSIS. Sometimes, I read on help file, I can not find it out.
I want to find another example which it is more clearly to study it.
So, I want to ask everybody to have more documents.
Once again, thank you


search for files with nsi extension in your NSIS installation directories and you will find tons of examples. They are grouped to a certain topic or subject. If you read just some of them you will understand a lot.

Nobody can help you understanding NSIS, unless you have some experience. Compile examples, see what they are doing and look in the code.

Good luck!