|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
NSIS Array script header
Here's something that I worked on Today... It allows use of Arrays in NSIS! It's also Object oriented (sort of) meaning that the methods are used like so:
${Array} myArray ${myArray.Push} "string" Current methods I've created are: Array, Set, Get, Shift, Unshift, Push, Pop, Put, Slice, Delete, Reverse, Copy, Init, Clear Readme and example included. http://myweb.tiscali.co.uk/imker/downloads/Array.zip Tell me what you think! -Stu |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
funny, i wanted to ask about arrays today
|
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
That's wierd
![]() I must say though that it isn't very efficient (it's using INI files as data stores). This'll be a good substitute though until real arrays are built in (if they ever are!) -Stu |
|
|
|
|
|
#4 |
|
Major Dude
|
The NSIS stack is an array, but it's the only one "real" array if you use NSIS by itself.
You could also use Math plugin, which has arrays, and string convertion to array (converts every char to an array item). If you search the forum, there is a very powerful StrRep for Math plugin, for example. It uses arrays, so you can replace lots of words at once. |
|
|
|
|
|
#5 |
|
Major Dude
|
I've tested it now, and it's great. However, maybe I should have more time go check it out completely...
Before, I also wanted an implementation of arrays on NSIS, and I even had some functions already done (implemented with stack), but I changed to the plugin afterwards because it's easier and doesn't give that message "Installer corrupted" .
|
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Thanks deguix
![]() I've just got a copy of Visual Studio 2003, so maybe I'll try writing an Array plugin. I'll have a look at the ExDLL, but I've never done C++ before so it'll be quite a fun task! -Stu |
|
|
|
|
|
#7 |
|
Major Dude
|
Hmmm... I just said that Math plugin already does that...
|
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Hmm yeh, but I don't think it has any special built in array functions like the ones I would need?
I'm thinking of a plugin specifically for arrays. -Stu |
|
|
|
|
|
#9 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Uploaded new build where I've changed "." to "->"
-Stu |
|
|
|
|
|
#10 |
|
Member
Join Date: Jun 2004
Location: Barcelona
Posts: 57
|
The Power of Imagination !!!Congratulations for you job ¡ There´s a concept that i don´t understand. Can you explain a little this : ${ArraySection} "section" ? Thanks in advance |
|
|
|
|
|
#11 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Don't worry, I'm going to remove those settings tonight because they aren't really necessary.
For now, you can just ignore them. You don't need to use them at all. -Stu |
|
|
|
|
|
#12 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
New build uploaded. Please note that ${myArray->Clear} has now become ${myArray->Destroy} ${myArray->Clear} is now reserved for another purpose.
Settings have been removed. -Stu |
|
|
|
|
|
#13 |
|
Major Dude
|
typo in readme:
line 12: " - 2. Hot to use" may be it is , but i think the following is correct:line 63: " 2. How to use" - a freudian laps ... - hand by comm@nder21 ---------- WiKi pages:CreateInternetShortcut|Enhanced FindWindow|Parse CSV-Data|Open/Close CD-Drive|Installer without Icon|Vista application compatibility |
|
|
|
|
|
#14 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
lol thanks. I'll fix it tonight
![]() -Stu |
|
|
|
|
|
#15 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Added ${myArray-Exists} flow control function which checks if a value exists in myArray.
-Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|