|
|
#1 |
|
Junior Member
Join Date: Jul 2005
Posts: 2
|
How to get a string inside a string
so, i tried reading the manual about this thing, but it made no sense at all to me. so here goes.
i've got a string '"C:\Path to\mIRC\mIRC.exe" -uninstall' without the 's but with the "s. i know i should create a function to read the string inside the "s, but that's where my lack of skill comes in. and after i get the string i should then get only the path of it and drop the filename. and if you are wondering "why do you need something like that" well mirc's license doesn't allow mirc to be distributed in a modified form or in any other form than the original installer... for for the user to have an enjoyable install experience and to respect the license. the install should auto-detect mirc's install-dir and copy mirc.exe to the scripts dir (everything else is done except the auto-detecting mirc's folder based on that string). i hope someone can help :/ |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
I'll write a quick function. Will take a few minutes.
-Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
There are already multi-purpose string functions in StrFunc.nsh which would have done this task equaly well, but here's a function just for doing what you need:
http://nsis.sourceforge.net/wiki/Get...between_quotes -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#4 |
|
Major Dude
|
Wow, good to see that there is someone very experienced in the functions area. That's a lot of functions you got there (see Afrow UK's signature).
|
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
BTW:
The script uses headercode: |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jul 2005
Posts: 2
|
thanks a lot everyone.
you forgot to tell how to get just the path from the C:\path\filename.exe but i managed to figure it out with the WordFind function. now the installer rocks you guys rock
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|