Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   String replace (http://forums.winamp.com/showthread.php?t=252912)

art4eye 9th August 2006 14:13

String replace
 
I'm working with some config files, and they use the install dir. Though the program needs double slashes in the config file. So I need to edit a string so it has double slashes

I couldn't find a function for doing this, any tips on how to solve this issue

Joel 9th August 2006 14:18

here, here and ${NSISDIR}\include\StrFunc.nsh

Didn't look enough, huh?

art4eye 9th August 2006 14:38

Might be

code:
${WordReplace} "$INSTDIR" "\" "\\" + $R0

That gave me a big fat error though =/

Invalid command: ${WordReplace}

Joel 9th August 2006 14:40

Assuming that you read:
PHP Code:

!include "WordFunc.nsh" 


art4eye 9th August 2006 14:42

yupp

Afrow UK 9th August 2006 16:00

See the bit at the top:
Quote:

Usage in script:
1. !include "WordFunc.nsh"
2. !insertmacro WordFunction
I think you missed number 2.

-Stu

art4eye 9th August 2006 17:24

looks like it. Added it, but now it throws a new error at me :S

code:

!include: closed: "C:\Program Files\NSIS\Include\WordFunc.nsh"
!macro "WordFunction": unterminated (no !macroend found in file)!
Error in script "C:\design\mangadownload\openvpn\sample\sample\installer\md.nsi" on line 162 -- aborting creation process



It's the first time I have a try at making an installer, so bear with my stupidity

art4eye 9th August 2006 17:33

arg, stupid me, typo XD


All times are GMT. The time now is 04:46.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.