rainer2003
30th June 2003 10:22 UTC
\\ replacer (Help !!!!)
I can not make this work, is there somebody who have any knowledge about this script?????
Push $INSTDIR (e.g. C:\program~1\nsis)
Call ConvertBStoDBS
Pop $R0
Function ConvertBStoDBS
Exch $R0 ;input string
Push $R1
Push $R2
StrCpy $R1 0
loop:
IntOp $R1 $R1 - 1
StrCpy $R2 $R0 1 $R1
StrCmp $R2 "" done
StrCmp $R2 "\" 0 loop
StrCpy $R2 $R0 $R1 ;part before
IntOp $R1 $R1 + 1
StrCpy $R1 $R0 "" $R1 ;part after
StrCpy $R0 "$R2\\$R1"
Goto loop
done:
Pop $R2
Pop $R1
Exch $R0 ;output string
FunctionEnd
cubalibre
30th June 2003 15:01 UTC
try to use StrReplace instead
i´ve tried to use the function ConvertBStoDBS too, but it seams that
it results in an endless loop.
I have used the StrReplace Funktion an everything is working fine.
Push "${TEMP}" ;original string
Push "\" ;needs to be replaced
Push "\\" ;will replace wrong characters
Call StrReplace
Pop $0
MessageBox MB_OK $0
Good Look
CL :-)
rainer2003
30th June 2003 15:08 UTC
Thanks :-) It did work as I hoped !!!
Afrow UK
30th June 2003 20:10 UTC
The ConvertBStoDBS function has been repaired now.
Thanks for reporting the problem.
-Stu