![]() |
howto using macro
Hi,
call me stupid or something, but what i have to do with given macros ( http://nsis.sourceforge.net/RadioButtons#Macros )? i don't know where to save this code to use it. can somebody give me one (or more) tipps? |
|
I've seen this site before, it shows me how they work, but not how to implement. the question is, can i "outsourcing" the macro code to another file?
|
Yes you can do it in one or more headers (nsh) and include 'em in your main script e.g. !include "myheader.nsh"
You may want to take a look at the included within NSIS installation headers e.g. FileFunc.nsh would give you a start. |
mmh, i already try that.... i will try it again. thx for help
|
Well, take a look here, download the full project and examine it, should be easier to go with it.
http://nsis.sourceforge.net/NSIS_Bey...nstallation_II |
code: |
I'd like me to be helpful, could you be more specific?
|
sorry, yes, ok, here what i want to do:
Maybe you know Daemon Tools for virtually mounting CDs/DVDs and awxDTools is a helpfull tool mounting CDs/DVDs directly from context menu. But there are some buggy problems (under vista) i want to change. one of them is the language selection via registry. so i want to create a tool, that can change the language. thats why i need radiobuttons. code: The RadioButtons.nsh is the postat macro. ps, ist an autogeneratet code, so some things might be not correct. |
Well, $(^Name) might be useless because it might contain invalid characters for the registry, better use a string that you know it's gonna be acceptable, also writing to registry requires a root which might be defined as well e.g
RadioButtons is a macro included in NSIS header Sections.nsh, you do not need to include it as separate header while actually there is not such header named RadioButtons.nsh.code: Even more, sections.nsh is a header dedicated to make the life easy regarding to control of components/sections, it won't help you do such things like you mentioned above. |
my intension was this:
code: |
This makes sense :)
Provided that you show the components page, include sections.nsh and use readiobuttons into .OnSelChange function to have only one section selected. The included example one-section.nsi is almost identical for such a case. It needs quotes here: WriteRegStr HKEY_CURRENT_USER "Software\arniWORX\awxDTools" "Language" "English" |
yes, but also one-section.nsi has the same problem with "already found"
|
This is weird, the example works pretty fine with or without logiclib included.
Just found an identical for your case example that I've posted here the other day. Could you please copy/paste my code compile it and let us know if the same problem occurs? http://forums.winamp.com/showthread....hreadid=267375 |
yepp, thats weird. your example works....
|
So what is this "RadioButtons.nsh"?
I suspect is a header that you've made which causes the conflict. If you have copied there the RadioButtons macros you don't need to do that, simply include the sections.nsh header. |
yes, so it is. i think i will rewrite your code an implement it.
thx for your help. |
| All times are GMT. The time now is 04:58. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.