Archive: NSIS Command Highlighter


NSIS Command Linker
some weeks ago, i've updated the docs in order to link all commands, but i don't think these have ever been published.

well, it doesn't matter anymore, because now there's this userscript for chrome (runs natively, but it's a bit unreliable) and firefox (requires greasemonkey). it will link all nsis commands to the scripting reference, while you're browsing the winamp forums or the nsis wiki.

unfortunately, this is a rather primitive script and i'd love to improve it over the time. the main problem is probably the current documentation. it works fine for offline use, but it could be better for online use.

to improve the situation, i think it'd be better to have a wiki page for each nsis command or anchors using the command-name rather than ever changing chapters. this allows better linking of commands, which will ultimately improve the script, the linking situation on the forum and will presumably produce better google hits. i'm willing to create wiki entries for each command, i'm not sure if it's desired by the nsis maintainers (let's discuss this!)

anyway, until there's a new nsis version available, the script should work fine.

install nsis.user.js and reload this page to see it working on thisexample:

OutFile example.exe
XPStyle on
SetCompress auto

Section MySection
Nop
SectionEnd

!ifdef addFunction
Function MyFunction
MessageBox MB_OK "We got a function!"
FunctionEnd
!endif


i'm planning to add some common macros, as well as plugins and functions from the nsis wiki. until then, i'm happy about all kinds of feedback!

Firefox 4 - working fantastic, thanks!


Hi Yathosho,

it's working great on Chrome 12.0.

Would it be somehow possible to implement functionality to have some directory where users can add their own definitions, which will be opened by the script?
That way plugin documentation can be added by users, and won't need an update of the script.


One bug though (which doesn't prevent the script from working):

The url is built with:
"http://nsis.sourceforge.net/Docs/"
+
"/Chapter4.html#4.9.4.1"
which results in:
"http://nsis.sourceforge.net/Docs//Chapter4.html#4.9.4.1"
It should be:

"http://nsis.sourceforge.net/Docs/"
+
"Chapter4.html#4.9.4.1"


new version out now!

* added NSIS 3.0a0 commands
* modified detection logic
* underlined links, original text color preserved

the script doesn't work too reliable on chrome (or at least there's a delay), but in firefox it works very well

created a wiki page as well:
http://nsis.sourceforge.net/GreaseMonkey_UserScript


as of 0.2.2, greasemonkey will automatically update the user script once there's a new version


v0.2.8
there have been a couple of new versions since i last posted here. these are basically the changes since last time:

- added support for FileFunc, TextFunc, WordFunc
- added support for LogicLib
- added support for callback functions
- added support for plugins ("i feel lucky!")

https://github.com/idleberg/NSIS-Linker.user.js


Are the new (NSIS 3.0a0) commands supported?


Originally posted by T.Slappy
Are the new (NSIS 3.0a0) commands supported?
yes (see above)