Archive: Newbie question


Newbie question
Hi all,

I'm using Crimson Editor to develop the NSIS installer. The problem is that I don't see any colors when working on a *.nsh header file. Are there settings I can modify in Crimson Editor to see the colors of defined variables? Or is there another tool I can use that is a best fit to work with NSIS files?

Thanks!


This is not a Crimson Editor support forum and I never used that editor before, but I can recommend Notepad++ to edit .nsi/.nsh files ;)

http://notepad-plus.sourceforge.net/


Notepad++ is a great text editor. I use it frequently when I need to edit edit individual NSI/NSH files.

But for an entire project, I haven't found anything that beats EclipseNSIS (a plugin for the Eclipse IDE).

And as LoRd_MuldeR points out, this is a forum about NSIS. If you want info about Crimson editor, you should probably try looking at their site for the documentation. (I found this page without too much trouble, which outlines how to use "link files" to assign a syntax to a particular extension.)


LoRd_MuldeR/Comperio,

Thanks so much for the reply. Notepad++ seems perfect solution (for my needs at this time). I will try out the Eclipse IDE as well.

It just came out incorrect, I just thought perhaps people use Crimson Editor to develop NSIS installer...I've already installed Notepad++ and i'm using it. It's great! Thanks again!


wow, version 5 of notepad++ looks awesome. think i should move away from hm nis editor. just one question, is there a way to compile a script within the editor?


There is also Notepad2 which was made as a replacement for the original Notepad but with syntax highlighting. I use it in conjunction with Notepad++ with Notepad2 replacing notepad.exe.

Stu


Originally posted by Yathosho
wow, version 5 of notepad++ looks awesome. think i should move away from hm nis editor. just one question, is there a way to compile a script within the editor?
Yes you can! :)

In Notepad++ goto "Run" -> "Run...", then type this:

"D:\NSIS\makensisw.exe" "$(FULL_CURRENT_PATH)"

Then click "Save" to save that as preset in the "Run" menu ;)

Notepad++ also works with Unicode files for those using the Unicode version.


Another Newbie question, How can I add two numbers?

In C# I would do:

string counter = 0;

if (something happens)
{
counter = counter + 1; or counter +=1;
}

if(counter > 3)
{
do something here;
}

If can't seem to find a simple example that shows adding two numbers in a form like above. Any hints will be appreciated.


StrCpy $0 0                 ; $0 = 0

IntOp $0 $0 + 1 ; $0 = $0 + 1

IntCmp $0 3 0 0 my_label ; IF $0 > 3 THEN GOTO my_label


For more info see "4.9.10 Integer Support" ;)

That would do! Thanks so much...I wish there were a little more simpler examples to pick up on syntax. In any case, if we have people like LoRd_MuldeR, things do become easier. Thanks so much!


LogicLib is ideal for selection and iteration without having to use labels.

Stu