Old 26th February 2018, 07:20   #1
theChaser
Junior Member
 
Join Date: Feb 2018
Posts: 2
NSIS push, pop and URLEncode

I'm trying to encode with URLEncode a strings in NSIS. I'm using a NSIS plugin called URLEncode. The problem is that I try encode 2 vars, but the first encoded var lost the value after I encoded the second var.

PHP Code:
Push "${AFF_NAME}"
Call URLEncode
Pop 
$3
// at this point the messagebox show the result good.
MessageBox MB_OK $3

ReadRegStr 
$0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "ProductName"
Push $0
Call URLEncode
Pop 
$0
// now after second var encoded the result of first var $3 lost the value
MessageBox MB_OK $
Please Help I'm very new using NSIS and I dont know how do it good. I searching info but without success.

Very thanks !
theChaser is offline   Reply With Quote
Old 26th February 2018, 12:11   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,768
I already answered you on Stackoverflow and updated the wiki.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 26th February 2018, 19:01   #3
Nutzzz
Junior Member
 
Join Date: May 2007
Location: Orange County, CA, U.S.A.
Posts: 45
I wasn't aware of System::Store S and L. Any reason to use it rather than doing a bunch of Push'es and Pop's (other than that it's sooo much simpler?) ;-)
Nutzzz is offline   Reply With Quote
Old 26th February 2018, 20:28   #4
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 4,768
Probably depends on how many push/pops are required to really know what is best. A plug-in call is probably slower so with 10 or more push/pops you might consider switching, never really done any tests to find out.

I was on a small tablet and just took the easy way out.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 27th February 2018, 15:45   #5
theChaser
Junior Member
 
Join Date: Feb 2018
Posts: 2
Quote:
Originally Posted by Anders View Post
I already answered you on Stackoverflow and updated the wiki.
Yes. Very thanks for your help. Now working perfect
theChaser 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