|
|
#1 |
|
Junior Member
Join Date: Jun 2001
Location: Sweden
Posts: 10
|
Hi,
I've been trying to figure out how to use variables with no luck. I want to use a variable to display my program name in dialog boxes etc. Name "My New app" Function .onInit MessageBox MB_YESNO "Do you want to install $R9?" IDYES NoAbort MessageBox MB_OK "Installation canceled by user." Abort NoAbort: FunctionEnd I tried; Section InstAppName StrLen $R9 "My New App" SectionEnd The docs make no sense to me is there an NSIS for Dummies?\plaz |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Apr 2001
Location: Melbourne, Australia
Posts: 207
|
Try changing StrLen to StrCpy. Everything should work then!
Of course, you could do it this way, too. Put this line at the start of your script. Then when you want to refer to it, use ${APPNAME}.code: You don't have to use APPNAME. Choose anything.code: No NSIS for Dummies! Just post any problems of yours here and someone will be glad to help.
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jun 2001
Location: Sweden
Posts: 10
|
Thanks for the tip!
I'll this asap. \plaz |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jun 2001
Location: Sweden
Posts: 10
|
Thanks Petersa,
Solved my problems. Did try this once before, but then I used NSIS 1.44 and that didn't work. \Plaz
|
|
|
|
|
|
#5 |
|
Junior Member
|
The only problem with your original script was you were using StrLen (which would return the length of a string) when you should have been using StrCpy (which copies on string into another). But I would suggest taht you keep your variables from something that is well, variable. If it's going to stay the same use a !define.. 8) Anyway.. Have fun!
|
|
|
|
|
|
#6 |
|
Junior Member
|
So, what am I doing wrong here...?
!Define APPNAME 'GoogleSpell Add-on for Daves Quick Search Deskbar' Here's the script error I get... Processing script file: "C:\glenn\dev\dqsd\addons\googlespell\googlespell.nsi" !define: "APPNAME"="GoogleSpell Add-on for Daves Quick Search Deskbar" Name expects 1 parameters, got 7. Usage: Name installer_name Error in script "C:\glenn\dev\dqsd\addons\googlespell\googlespell.nsi" on line 8 -- aborting creation process Using v1.98
|
|
|
|
|
|
#7 |
|
Registered User
Join Date: Jan 2002
Posts: 30
|
wild wild guess, but try this:
Name "${APPNAME}" I'm thinking right now you have: Name ${APPNAME} Although I'm really not sure... |
|
|
|
|
|
#8 |
|
Junior Member
|
Doh!
You're right. Thanks. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Jan 2002
Posts: 30
|
Glad I could help.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|