neil.benn
6th May 2007 21:36 UTC
Assign an Integer Value to a Variable
Hello,
This is gonna seem like a really stupid question but here goes. I have a variable I have defined say var MY_COUNTER. I have worked out how to add 1 to it by using IntOp. However what I cannot work out how to do is to set it to a particular number, say 5685 or 6457, etc.
Err, this is gonna sound stupid but how to I do that? Sorry to ask such a basic question but I cannot find an answer in the docs, web search or anything!!
Thanks in advance.
Cheers,
Neil
Red Wine
6th May 2007 22:04 UTC
Either you mean StrCpy $MY_COUNTER 6457 or I'm completely confused. :)
Anders
6th May 2007 22:15 UTC
In nsis, all variables and registers (and the stack) are strings internally, so when you use IntOp the string is converted to a number and back
neil.benn
6th May 2007 22:17 UTC
Hello,
That's it understand now - thanks. I was not using strcpy because I wanted to assign an int - not a string. However if everything is a string inside and strcpy works then I understand.
Thanks fro your help.
Cheers,
Neil