Old 7th April 2004, 01:16   #81
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
As you wish, removed all info about this function for now, until I get it done (won't be so soon ):
Attached Files
File Type: zip strfunc.zip (9.9 KB, 269 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 7th April 2004, 15:02   #82
evilO
Senior Member
 
Join Date: Jan 2004
Location: Strasbourg, Europe
Posts: 117
Hi Deguix !

I'm sorry to have discouraged you, I just wanted to help...
But, as I told you in a previous post, it's quite complicated to write
numbers in french (I think you have noticed ).
And I tried to make it as simple and structured as possible...

Well, it's not an easy job, I understand you don't want to program that now.
Just let me know when something is done if you want me to do some tests..

evilO/Olive
evilO is offline   Reply With Quote
Old 7th April 2004, 22:51   #83
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
I don't want to do that now because I working on several projects for some other programs. Just to prevent "overload". But when everything is clear I'll work again on it.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 5th June 2004, 00:01   #84
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
I just uploaded the new version of StrFunc.nsh test. Is to replace the older one (which doesn't compile now). It tests all commands when installing and uninstalling.
Attached Files
File Type: nsi strfunc.nsi (16.9 KB, 363 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 25th June 2004, 11:04   #85
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
So which one is it going to be for 2.01?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 25th June 2004, 17:51   #86
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
1) The last zip file.

2) This last file which is the test of StrFunc (as you or Joost requested in PM, replacing the example coming with NSIS which has problems).

3) The updated documentation below. I fixed only the mention of StrNumToStr on the Comments about functions included and not included, Version History and Functions Credits. Same version.
Attached Files
File Type: txt strfunc.txt (21.2 KB, 498 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 17th September 2004, 00:21   #87
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
String Functions Header File 1.07

As kichik slowed so much the release of NSIS 2.01 (see previous posts) I could have some time off to do the new String Functions Header File. Give a look on these changes below:

1.07 - 09/16/2004

- StrStrAdv and StrCase have their functions remodeled with LogicLib.
Functions have a lesser chance to have bugs.
- Added case-sensitive comparation option for StrStrAdv.
- StrCase now uses System.dll which makes case convertions effective with
all latin letters (i.e. ê).
- StrClbSet and StrClbGet removed, added StrClb.
- Made compact the most usual operations inside the header file. File size
reduced.
- Added "!verbose" to header file -> faster compilation and header file
output organized (code borrowed from LogicLib.nsh).

Kichik, as you plan to release NSIS 2.01 (for real this time) you can put the StrFunc test example on NSIS for now (just to update). Then afterwards, I'll create a better example like the one from Word Functions Header File (but better, hehe what am I planning now?)

Thank you dselkirk and eccles for LogicLib. That tool made everything easier for me this version...

This file below contains:

- StrFunc.nsh (header)
- StrFunc.txt (manual)
- StrFunc.nsi (example)
Attached Files
File Type: zip strfunc.zip (15.1 KB, 219 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 17th September 2004, 10:26   #88
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
  • The example fails on StrClb
  • If you're already using System.dll, why not use IsCharAlpha or even GetStringType instead of lots of comprasions?
  • You don't have to make two copies of the code, you can assume the LogicLib is present. It is installed a line after StrFunc.nsh in makensis.nsi

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th September 2004, 11:23   #89
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Updated documentation because I forgot to remove a feature from ${StrCase}. (not again)

Quote:
The example fails on StrClb
This was not expected by me, where did you find the failure?

Quote:
If you're already using System.dll, why not use IsCharAlpha or even GetStringType instead of lots of comprasions?
Maybe you should give me "IsCharAlpha" code, because I couldn't get it to work at any costs.

Quote:
You don't have to make two copies of the code, you can assume the LogicLib is present. It is installed a line after StrFunc.nsh in makensis.nsi
The real thing is that the LogicLib version is (probably) the same as the converted to normal one. Commenting one of them makes no difference. If you want me to do so I can comment the LogicLib one and just include the original in the distribution.
Attached Files
File Type: txt strfunc.txt (21.7 KB, 378 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 17th September 2004, 11:30   #90
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
The failure is in Examples\StrFunc.nsi.

IsCharAlpha needs a char. For this, you can treat the string a struct of some bytes and get the first byte.

If I were you, I'd prefer keeping the LogicLib code. It's simpler. Why keep two versions? It's more work.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th September 2004, 11:42   #91
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
The failure is in Examples\StrFunc.nsi.
But where in the file? I tested and everything passed...

Quote:
IsCharAlpha needs a char. For this, you can treat the string a struct of some bytes and get the first byte.
I'm not getting this code to work for days. And I already tried that without any luck.

Quote:
If I were you, I'd prefer keeping the LogicLib code. It's simpler. Why keep two versions? It's more work.
Ok, at least you know how difficult is to create one... I just wanted to keep the original because it doesn't require LogicLib, but if you think so, I'll fix that at night.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 17th September 2004, 12:10   #92
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
With the files you've attached, it fails in the uninstaller. I haven't gotten into it to see which line exactly.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th September 2004, 21:08   #93
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
I attached the example again. It's still working for me normally.

(I should add another thing to the documentation about the "${UnStrFunc}" which was removed)
Attached Files
File Type: nsi strfunc.nsi (19.1 KB, 325 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 17th September 2004, 21:47   #94
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
I managed to solve it by passing OpenClipboard the window handle (was giving errors about the thread not having an open clipboard associated with it) and by locking and unlocking the handle returned by GetClipboardData (like in the MSDN example).

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 17th September 2004, 22:28   #95
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
I managed to solve it by passing OpenClipboard the window handle (was giving errors about the thread not having an open clipboard associated with it) and by locking and unlocking the handle returned by GetClipboardData (like in the MSDN example).
The code I used was mostly copied (only with added comments and united options) from the separated old ${StrClbSet} and ${StrClbGet}. The older versions didn't have the window handle set.

If you are getting errors now, you never tested those before (I think). Can you test if the older StrFunc.nsh version ${StrClbSet} and ${StrClbGet} have this problem?

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 18th September 2004, 00:22   #96
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Posted version requiring LogicLib.nsh to be included before including StrFunc.nsh. But there is still the problems about "IsCharAlpha" API and "${StrClb}" with that issue you said. Maybe is better you to fix the issues above as I don't know how to fix them ...
Attached Files
File Type: zip strfunc.zip (14.1 KB, 343 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 18th September 2004, 10:46   #97
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
The original example had just one test. The new example has many and it usually doesn't fail in the first one. If I add more tests to the original example, it fails too.

Here's an example for IsCharAlpha:
code:
StrCpy $0 "testing... testing... 1 2 3"

System::Call "*(&t${NSIS_MAX_STRLEN} r0) i .r1"
StrCpy $2 $1
loop:
System::Call "*$2(&i1 .r4)"
StrCmp $4 0 done
System::Call "user32::IsCharAlpha(i r4) i .r4"
StrCmp $4 0 0 +3
DetailPrint "$4 - not alpha"
Goto +2
DetailPrint "$4 - alpha"
IntOp $2 $2 + 1
Goto loop
done:
System::Free $1


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 21st September 2004, 03:54   #98
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
I'm going to fix tomorrow morning or night (depending if I have time). But what did you do to result in that code so fast? I think only you and brainsucker (and some other people) knows how to do everything with System plugin.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 21st September 2004, 22:29   #99
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Ok, I've done what you told me. However maybe you should give the code of ${StrClb} that worked with you so I can implement it to the header file. I can't do anything else because on my computer the old example (first published 1.07 example) runs perfectly.

I re-added "<>" (switch) case for ${StrCase} because of the code you gave me on your last post.
Attached Files
File Type: zip strfunc.zip (13.5 KB, 333 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 22nd September 2004, 16:17   #100
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
It would be nicer if you include LogicLib.nsh yourself and not ask the user to do it. There will be no errors if it's included more than once.

You forgot to System::Free call for the allocated buffers in StrCase.

StrClb changes are really simple. Lock and unlock what you get from GetClipboardData and pass $HWNDPARENT and not 0 to OpenClipboard.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 22nd September 2004, 19:59   #101
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
StrClb changes are really simple. Lock and unlock what you get from GetClipboardData and pass $HWNDPARENT and not 0 to OpenClipboard.
I'm not totally experienced on System plugin (as I implicitly said with "IsCharAlpha"). I think this discussion could be shortned by just posting a simple code like that one you posted for "IsCharAlpha" (as you said it's simple for you and that you done it already).

If I would do the code, then probably in the future I would need to fix something on this code as it could not continue to work on your computer... Sorry if I'm so dumb to understand it completely.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 27th September 2004, 09:57   #102
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Thanks kichik for including your changes to StrFunc.nsh on NSIS 2.01. Everything is working perfectly.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 12th October 2004, 22:02   #103
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
New version of StrFunc. The biggest change: all functions from StrFunc are now on LogicLib coding, and comments added on most parts of functions. Second biggest change: StrSort has been changed and can break old scripts. See its documentation. List of changes:

1.08 - 10/12/2004

- Converted all the functions to LogicLib.
- StrSort: Totally remade and it can break old scripts. See documentation for details.
- Added defines: StrFunc_List, *_List and *_TypeList.
- Fixed StrStrAdv: Variables $R0-$R3 couldn't be used on scripts before calling.
- StrRep: Cut down some variables.
- Arranged correctly the order of StrSort on the documentation.
Attached Files
File Type: zip strfunc.zip (16.6 KB, 328 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 20th October 2004, 16:01   #104
evilO
Senior Member
 
Join Date: Jan 2004
Location: Strasbourg, Europe
Posts: 117
Hi Deguix

I know I haven't been on the forum for a while, I just had tons of work to do (and still no Internet connection at home..).
But I was keeping an eye on your String functions header.. I downloaded the last version... Really nice job !

Well, I just had 2 problems using the new functions header file (but I didn't test all the functions):
- I had to fix all the "StrTok" calls in my scripts as you decreased the starting index for the "ResultPart" (and to re-test and validate everything )
- You forgot a "Push $R0 / Pop $R0" in the function "StrTok", the content of $R0 is lost when the function exits

That's all for now.. bye


evilO/Olive
evilO is offline   Reply With Quote
Old 20th October 2004, 18:48   #105
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
You forgot a "Push $R0 / Pop $R0" in the function "StrTok", the content of $R0 is lost when the function exits
It's even worse than I thought, $9 contents are lost also. Thanks for the information.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 21st October 2004, 16:56   #106
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
So what goes into 2.02?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 22nd October 2004, 02:49   #107
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
I didn't even start to work on it. I totally forgot about NSIS 2.02. As there are only small fixes requested this should be completed tomorrow evening or even sooner.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 22nd October 2004, 09:42   #108
evilO
Senior Member
 
Join Date: Jan 2004
Location: Strasbourg, Europe
Posts: 117
Hi Deguix

Hum I noticed some other small problems with the new version of StrFunc.nsh while I was doing some further testing:


------- StrCase:
An instruction is missing at the beginning of the function (Exch), the contents of $0 and $1 are swapped when the function exits


------- StrClb:
- I couldn't manage to swap strings using "<>", so I modified the function, but you'll probably find a better fix

One thing I didn't understand:
For the operation "<", after the call to "GetClipboardData" there is the handle in $2
For the operation "<>", after the call to "GetClipboardData" there is the string in $2
Why?

- There is a typo in the function's comments:

$0 = Action (input)
$1 = String (input)

should be

$0 = String (input)
$1 = Action (input)

------- StrRep:
An instruction is missing at the end of the function (Pop $R3), the content of $R3 is lost


------- StrSort:
There is a parameter missing in the doc's example


------- StrStrAdv:
The example in the doc is slightly wrong:
PHP Code:
${StrStrAdv} $"This IS really just an example" "IS " ">" ">" "1" "0" "1" 
returns "IS really just an example" (and not "really just an example" as stated in the doc)

To get the string "really just an example", the example should be
PHP Code:
${StrStrAdv} $"This IS really just an example" "IS " ">" ">" "0" "0" "1" 

Hum I think that's all I found..
Have a nice day


evilO/Olive
Attached Files
File Type: txt strfunc.nsh.diff.txt (2.6 KB, 344 views)
evilO is offline   Reply With Quote
Old 22nd October 2004, 11:34   #109
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
OK, I expected those functions to have bugs, but I didn't think they contained so many of them.

I can see that those are mainly from stack, so I should add to the StrFunc.nsi StrCpy's for each variable, and see if they are swaped when they shouldn't be.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 22nd October 2004, 12:59   #110
evilO
Senior Member
 
Join Date: Jan 2004
Location: Strasbourg, Europe
Posts: 117
Well they didn't contain that much bugs since you rewrote a lot of the code.. Moreover, the functions *do* work, as you said it's mainly stack problems..
Well, I spoted them because I had strange behaviors in my installers all of a sudden..
Quote:
I can see that those are mainly from stack, so I should add to the StrFunc.nsi StrCpy's for each variable, and see if they are swaped when they shouldn't be.
Hum I used a user-defined variable and the "dumpstate" plugin to check the content of the variables, you could do that in a shortened version of StrFunc.nsi to test..

Ah, and have you an answer for my question about "GetClipboardData" ?

Thanks, bye !

evilO/Olive

PS: sorry I should have attached the 'nsh' file in the previous post..
Attached Files
File Type: txt strfunc.nsh.txt (46.8 KB, 257 views)
evilO is offline   Reply With Quote
Old 22nd October 2004, 14:18   #111
IronFist
Banned
 
Join Date: Oct 2004
Posts: 6
IRON JUSTICE

*removed*
IronFist is offline   Reply With Quote
Old 22nd October 2004, 18:55   #112
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
Quote:
Well they didn't contain that much bugs since you rewrote a lot of the code...
For me one bug is enough to make me fix it, so I say one is a lot.

Quote:
Hum I used a user-defined variable and the "dumpstate" plugin to check the content of the variables, you could do that in a shortened version of StrFunc.nsi to test..
I'm going to do that because that way it is automatic. This means (about) never this bug will appear again when scripting.

About the documentation, as it is not done automatically, it will probably have typos.

Quote:
Ah, and have you an answer for my question about "GetClipboardData" ?
Not yet, I have to share the computer with 3 more people so my time is restricted.

(next time attach .nsh files as they are, don't use the extention .txt at the end)

My Wiki Pages

Working now on:
New projects. (language: any)

Last edited by deguix; 22nd October 2004 at 19:48.
deguix is offline   Reply With Quote
Old 22nd October 2004, 23:34   #113
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
String Functions Header File 1.09

I fixed those bugs and some others from other topics posts:

1.09 - 10/22/2004

- Fixed stack problems involving: StrCase, StrRep, StrSort, StrTok.
- Fixed StrClb: When "Action" = "<>", handle was wrongly outputed as text.
- Fixed StrSort, StrStrAdv documentation examples.
- Fixed StrIOToNSIS, StrLoc, StrNSISToIO, StrRep, StrStr: sometimes didn't find "StrToSearch" at all.
Attached Files
File Type: zip strfunc.zip (17.0 KB, 311 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 25th October 2004, 09:28   #114
evilO
Senior Member
 
Join Date: Jan 2004
Location: Strasbourg, Europe
Posts: 117
Quote:
For me one bug is enough to make me fix it, so I say one is a lot
Well from that point of view of course..
Quote:
I'm going to do that because that way it is automatic
Ok I didn't understand exactly what you intended to do in the first place..
Quote:
About the documentation, as it is not done automatically, it will probably have typos
Hum yes just another typo: for the example of "StrSort" I think that
PHP Code:
${StrSort} $"This is just an example" " just" "" "ple" "0" "0" "0" 
should be
PHP Code:
${StrSort} $"This is just an example" "" " just" "ple" "0" "0" "0" 
Quote:
next time attach .nsh files as they are, don't use the extention .txt at the end
Oops I wasn't awake this day, I missed "nsh" in the valid file extensions..

Bye !

evilO/Olive
evilO is offline   Reply With Quote
Old 9th January 2005, 23:34   #115
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,354
Send a message via ICQ to deguix
This alternative version has a more compressed code on the header file than this current version. A drawback is the slower speed of compilation for the user. (That's why it's alternative from the current version).

It shows how to make the use of "!system" compile time instruction to bypass the limitation of inclusion of macros inside macros by using the inclusion of external files. (macros can include macros from other files only)

The resulted executable will have the exact size as using the default one.

I'm sad that this approach didn't make my code smaller w/ a decent speed.
Attached Files
File Type: nsh strfuncalt.nsh (42.4 KB, 241 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 7th November 2007, 03:16   #116
congtak
Junior Member
 
Join Date: Oct 2007
Posts: 12
Hi,
i have this problem to solve,
I want to remove the very last "\" from a string
example : "C:\abcd\abcd\"
I want to convert this string to "C:\abcd\abcd"

I tried to use

StrLoc $0 "C:\abcd\abcd\" "\" "<"

but $0 = 11 instead of 1
so StrLoc counts the location from the end of string but doesnt start the search from the end of the String so it still gives the first "\" found. Is there any way to solve my problem?

Thanks
congtak is offline   Reply With Quote
Old 7th November 2007, 09:34   #117
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
StrCpy $0 `C:\abcd\abcd\` 1 -1
StrCmp $0 `\` 0 +2
StrCpy $0 $0 -1

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump